changeset 322:2cb8e29e1c9c

Update pre-commit-hooks
author Amine Sehili <amine.sehili@gmail.com>
date Sat, 19 Oct 2019 23:28:11 +0100
parents 903b5e1e8af9
children 7c2fb10b949f
files .pre-commit-config.yaml auditok/io.py
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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']
 
--- 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))