Skip to content

Commit

Permalink
fix one more
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Oct 1, 2024
1 parent e9ceb5e commit 064d76b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 3 additions & 5 deletions tutorials/audio/10_base_sounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 064d76b

Please sign in to comment.