diff --git a/pyproject.toml b/pyproject.toml index ea8ecc9..3bfcd60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,7 +157,6 @@ select = ['A', 'B', 'D', 'E', 'F', 'G', 'I', 'LOG', 'NPY', 'PIE', 'PT', 'T20', ' '*.pyi' = ['E501'] '__init__.py' = ['F401'] 'tutorials/*' = ['D205', 'D400', 'T201'] -'tutorials/audio/10_base_sounds.py' = ['UP031'] [tool.ruff.lint.pydocstyle] convention = 'numpy' diff --git a/tutorials/audio/10_base_sounds.py b/tutorials/audio/10_base_sounds.py index abb518e..bfb6889 100644 --- a/tutorials/audio/10_base_sounds.py +++ b/tutorials/audio/10_base_sounds.py @@ -60,7 +60,7 @@ # :class:`~stimuli.audio.Sound`. with TemporaryDirectory() as directory: - fname = Path(directory.name) / "my_pure_tone.wav" + fname = Path(directory) / "my_pure_tone.wav" sound.save(fname, overwrite=True) sound_loaded = Sound(fname) sound_loaded.play(blocking=True) @@ -85,10 +85,8 @@ # The volume is normalized, with the loudest channel set to ``100``. The ratio # between channels is preserved. -print("Volume of the original sound: %s" % "({:.1f}, {:.1f})".format(*sound.volume)) -print( - "Volume of the loaded sound: %s" % "({:.1f}, {:.1f})".format(*sound_loaded.volume) -) +print(f"Volume of the original sound: {sound.volume}.") +print(f"Volume of the loaded sound: {sound_loaded.volume}.") # %% # Visualize a sound