# HG changeset patch # User Amine Sehili # Date 1571524091 -3600 # Node ID 2cb8e29e1c9c3c1b23e3b9beda046964ea25f342 # Parent 903b5e1e8af9f4b6ef3c6b2b269b9fa08fc52a79 Update pre-commit-hooks diff -r 903b5e1e8af9 -r 2cb8e29e1c9c .pre-commit-config.yaml --- a/.pre-commit-config.yaml Sat Oct 19 15:01:38 2019 +0100 +++ b/.pre-commit-config.yaml Sat Oct 19 23:28:11 2019 +0100 @@ -1,8 +1,8 @@ repos: - repo: git://github.com/pre-commit/mirrors-autopep8 - rev: v1.4 + rev: v1.4.4 hooks: - id: autopep8 - args: ['-i', '--max-line-length=130'] + args: ['-i', '--max-line-length=80'] diff -r 903b5e1e8af9 -r 2cb8e29e1c9c auditok/io.py --- a/auditok/io.py Sat Oct 19 15:01:38 2019 +0100 +++ b/auditok/io.py Sat Oct 19 23:28:11 2019 +0100 @@ -44,6 +44,7 @@ DEFAULT_BAR_FORMAT_TQDM = "|" + "{bar}" + "|" + "[{elapsed}/{duration}]" DEFAULT_NCOLS_TQDM = 30 + DEFAULT_NCOLS_TQDM = 30 DEFAULT_MIN_INTERVAL_TQDM = 0.05 _WITH_TQDM = True except ImportError: @@ -386,7 +387,7 @@ else: bytes_to_read = self._sample_size_all_channels * size offset = self._current_position_bytes + bytes_to_read - data = self._data[self._current_position_bytes : offset] + data = self._data[self._current_position_bytes: offset] if data: self._current_position_bytes += len(data) return data @@ -682,7 +683,7 @@ if rest > 0: nb_chunks += 1 chunk_gen = ( - data[i : i + chunk_size] for i in range(0, len(data), chunk_size) + data[i: i + chunk_size] for i in range(0, len(data), chunk_size) ) return chunk_gen, nb_chunks @@ -995,4 +996,4 @@ ) else: err_message = "cannot write file format {} (file name: {})" - raise AudioIOError(err_message.format(audio_format, file)) \ No newline at end of file + raise AudioIOError(err_message.format(audio_format, file))