Fix flake8 errors

pull/14/head
Ewald de Wit 2022-09-24 09:57:41 +02:00
rodzic 34050fe2a1
commit dfa02fa5c5
2 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -85,5 +85,3 @@ class PlayItem:
chunk = self.sound[self.index:idx]
self.index = idx
return chunk

Wyświetl plik

@ -23,7 +23,7 @@ def write_wav(path: str, data: np.ndarray, rate: int, width: int = 4):
rate: Sample rate in Hz.
width: Sample width in bytes.
"""
if not width in [1, 2, 3, 4]:
if width not in [1, 2, 3, 4]:
raise ValueError(f'Invalid sample width: {width}')
data = np.asarray(data)
ch = 1 if len(data.shape) < 2 else len(data)