diff --git a/pyproject.toml b/pyproject.toml index e4c3d70..e48017a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,9 @@ vmh = "vmh.cli:app" pythonpath = "." filterwarnings = 'ignore' +[tool.ruff] +line-length = 79 + [tool.ruff.lint] select = ['I', 'N', 'F', 'E', 'W', 'D', 'PL'] ignore = ['D100', 'D101', 'D103', 'D104', 'D203', 'D213', 'PLR0913'] diff --git a/tests/test_audio.py b/tests/test_audio.py index 944fe7f..1be4cdc 100644 --- a/tests/test_audio.py +++ b/tests/test_audio.py @@ -4,7 +4,12 @@ from pydub import AudioSegment -from vmh.audio import _audio_chain, cut_silences, detect_silences, extract_audio +from vmh.audio import ( + _audio_chain, + cut_silences, + detect_silences, + extract_audio, +) audio_stub = { 'path': 'tests/test_assets/audio_test.wav', @@ -152,9 +157,7 @@ def test_cut_audio_silences(tmpdir): inpurt_file = 'tests/test_assets/sas.wav' output_file = tmpdir / 'out.mp3' expected_size = 1 - cut_silences( - inpurt_file, output_file - ) + cut_silences(inpurt_file, output_file) audio_seg: AudioSegment = AudioSegment.from_mp3(str(output_file)) diff --git a/vmh/audio.py b/vmh/audio.py index 9d484da..2cf9d43 100644 --- a/vmh/audio.py +++ b/vmh/audio.py @@ -66,7 +66,10 @@ def extract_audio( if eq: _eq_path = Path(output_file) eq_path = _eq_path.parent / ('eq_' + _eq_path.name) - return Path(output_file), Path(process_audio(output_file, str(eq_path))) + return ( + Path(output_file), + Path(process_audio(output_file, str(eq_path))), + ) return Path(output_file) diff --git a/vmh/equalize.py b/vmh/equalize.py index b3d5a39..bbf1bee 100644 --- a/vmh/equalize.py +++ b/vmh/equalize.py @@ -39,7 +39,9 @@ def _get_board() -> Pedalboard: """ effects = fx_chain - plugins = [getattr(pedalboard, effect)(**effects[effect]) for effect in effects] + plugins = [ + getattr(pedalboard, effect)(**effects[effect]) for effect in effects + ] return Pedalboard(plugins) @@ -54,7 +56,9 @@ def process_audio( effected = board(audio, ifile.samplerate) - with AudioFile(output_file, 'w', ifile.samplerate, ifile.num_channels) as outfile: + with AudioFile( + output_file, 'w', ifile.samplerate, ifile.num_channels + ) as outfile: outfile.write(effected) return Path(output_file)