diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 83cf6f89..48f9c0d4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.9 - name: Install Python dependencies run: pip install black flake8 isort diff --git a/examples/adaptive_filter_stft_domain.py b/examples/adaptive_filter_stft_domain.py index 256fe1ef..be64e57f 100644 --- a/examples/adaptive_filter_stft_domain.py +++ b/examples/adaptive_filter_stft_domain.py @@ -5,6 +5,7 @@ In this example, we will run adaptive filters for system identification, but in the frequeny domain. """ + from __future__ import division, print_function import matplotlib.pyplot as plt diff --git a/examples/adaptive_filters.py b/examples/adaptive_filters.py index ab27296d..e4b0df0e 100644 --- a/examples/adaptive_filters.py +++ b/examples/adaptive_filters.py @@ -4,6 +4,7 @@ In this example, we will run adaptive filters for system identification. """ + from __future__ import division, print_function import matplotlib.pyplot as plt diff --git a/examples/beamforming_delay_and_sum.py b/examples/beamforming_delay_and_sum.py index 4a83f1ec..9e882af2 100644 --- a/examples/beamforming_delay_and_sum.py +++ b/examples/beamforming_delay_and_sum.py @@ -1,6 +1,7 @@ """ This example shows how to create delay and sum beamformers """ + from __future__ import division, print_function import matplotlib.pyplot as plt diff --git a/examples/bss_example.py b/examples/bss_example.py index 22ead9b2..f16eb099 100755 --- a/examples/bss_example.py +++ b/examples/bss_example.py @@ -54,6 +54,7 @@ This script requires the `mir_eval` to run, and `tkinter` and `sounddevice` packages for the GUI option. """ + import time import numpy as np diff --git a/examples/datasets.py b/examples/datasets.py index 2e747359..ab9e1644 100644 --- a/examples/datasets.py +++ b/examples/datasets.py @@ -2,6 +2,7 @@ Example of the basic operations with ``pyroomacoustics.datasets.Dataset`` and ``pyroomacoustics.datasets.Sample`` classes """ + from pyroomacoustics.datasets import Dataset, Sample # Prepare a few artificial samples diff --git a/examples/raytracing.py b/examples/raytracing.py index f29410bb..59c414e5 100644 --- a/examples/raytracing.py +++ b/examples/raytracing.py @@ -2,6 +2,7 @@ This example program demonstrates the use of ray tracing for the simulation of rooms of different sizes. """ + from __future__ import print_function import argparse diff --git a/examples/room_L_shape_3d_rt.py b/examples/room_L_shape_3d_rt.py index 396be3d8..089acaa8 100644 --- a/examples/room_L_shape_3d_rt.py +++ b/examples/room_L_shape_3d_rt.py @@ -7,6 +7,7 @@ The simulation is done using the hybrid ISM/RT simulator. """ + from __future__ import print_function import time diff --git a/examples/room_complex_wall_materials.py b/examples/room_complex_wall_materials.py index fc9a2359..41bb1905 100644 --- a/examples/room_complex_wall_materials.py +++ b/examples/room_complex_wall_materials.py @@ -4,6 +4,7 @@ 2022 (c) @noahdeetzers, @fakufaku """ + import matplotlib.pyplot as plt import numpy as np diff --git a/examples/room_from_rt60.py b/examples/room_from_rt60.py index b97681b8..d33141e0 100644 --- a/examples/room_from_rt60.py +++ b/examples/room_from_rt60.py @@ -4,6 +4,7 @@ The simulation is pure image source method. The audio sample with the reverb added is saved back to `examples/samples/guitar_16k_reverb.wav`. """ + import argparse import matplotlib.pyplot as plt diff --git a/examples/room_from_stl.py b/examples/room_from_stl.py index 12d49086..12063d94 100644 --- a/examples/room_from_stl.py +++ b/examples/room_from_stl.py @@ -5,6 +5,7 @@ The STL file was kindly provided by Diego Di Carlo (@Chutlhu). """ + import argparse import os from pathlib import Path diff --git a/pyroomacoustics/adaptive/lms.py b/pyroomacoustics/adaptive/lms.py index a36446b2..dac915b8 100644 --- a/pyroomacoustics/adaptive/lms.py +++ b/pyroomacoustics/adaptive/lms.py @@ -5,6 +5,7 @@ Implementations of adaptive filters from the LMS class. These algorithms have a low complexity and reliable behavior with a somewhat slower convergence. """ + from __future__ import absolute_import, division, print_function import numpy as np diff --git a/pyroomacoustics/adaptive/subband_lms.py b/pyroomacoustics/adaptive/subband_lms.py index d9c0479c..70c0cf92 100644 --- a/pyroomacoustics/adaptive/subband_lms.py +++ b/pyroomacoustics/adaptive/subband_lms.py @@ -26,7 +26,6 @@ class SubbandLMS: - """ Frequency domain implementation of LMS. Adaptive filter for each subband. diff --git a/pyroomacoustics/beamforming.py b/pyroomacoustics/beamforming.py index 2cf0846b..f5d5fdf6 100644 --- a/pyroomacoustics/beamforming.py +++ b/pyroomacoustics/beamforming.py @@ -348,7 +348,6 @@ def circular_microphone_array_xyplane( class MicrophoneArray(object): - """Microphone array class.""" def __init__(self, R, fs, directivity=None): diff --git a/pyroomacoustics/datasets/cmu_arctic.py b/pyroomacoustics/datasets/cmu_arctic.py index a3e42e96..f9836197 100644 --- a/pyroomacoustics/datasets/cmu_arctic.py +++ b/pyroomacoustics/datasets/cmu_arctic.py @@ -29,6 +29,7 @@ URL: http://www.festvox.org/cmu_arctic/ """ + import os import numpy as np diff --git a/pyroomacoustics/datasets/tests/test_corpus_base.py b/pyroomacoustics/datasets/tests/test_corpus_base.py index 4d356b24..b49a7b27 100644 --- a/pyroomacoustics/datasets/tests/test_corpus_base.py +++ b/pyroomacoustics/datasets/tests/test_corpus_base.py @@ -2,6 +2,7 @@ Example of the basic operations with ``pyroomacoustics.datasets.Dataset`` and ``pyroomacoustics.datasets.Sample`` classes """ + from pyroomacoustics.datasets import Dataset, Sample diff --git a/pyroomacoustics/doa/grid.py b/pyroomacoustics/doa/grid.py index 6cf965ce..09d1e22b 100644 --- a/pyroomacoustics/doa/grid.py +++ b/pyroomacoustics/doa/grid.py @@ -1,6 +1,7 @@ """ Routines to perform grid search on the sphere """ + from __future__ import absolute_import, division, print_function from abc import ABCMeta, abstractmethod diff --git a/pyroomacoustics/doa/plotters.py b/pyroomacoustics/doa/plotters.py index 8b1846bc..764f3d24 100644 --- a/pyroomacoustics/doa/plotters.py +++ b/pyroomacoustics/doa/plotters.py @@ -1,6 +1,7 @@ """ A collection of functions to plot maps and points on circles and spheres. """ + import numpy as np diff --git a/pyroomacoustics/doa/utils.py b/pyroomacoustics/doa/utils.py index e738c96a..3bb4af9a 100644 --- a/pyroomacoustics/doa/utils.py +++ b/pyroomacoustics/doa/utils.py @@ -2,6 +2,7 @@ This module contains useful functions to compute distances and errors on on circles and spheres. """ + from __future__ import division import numpy as np diff --git a/pyroomacoustics/experimental/signals.py b/pyroomacoustics/experimental/signals.py index e6659af0..24359110 100644 --- a/pyroomacoustics/experimental/signals.py +++ b/pyroomacoustics/experimental/signals.py @@ -1,6 +1,7 @@ """ A few test signals like sweeps and stuff. """ + from __future__ import division, print_function import numpy as np diff --git a/pyroomacoustics/tests/test_bandpass_filterbank.py b/pyroomacoustics/tests/test_bandpass_filterbank.py index 07c9c94d..1522d2bb 100644 --- a/pyroomacoustics/tests/test_bandpass_filterbank.py +++ b/pyroomacoustics/tests/test_bandpass_filterbank.py @@ -1,6 +1,7 @@ """ This tests the construction of a bank of octave filters """ + import numpy as np from scipy.signal import sosfreqz diff --git a/pyroomacoustics/tests/test_issue_22.py b/pyroomacoustics/tests/test_issue_22.py index 76f3cb66..31df1b8a 100644 --- a/pyroomacoustics/tests/test_issue_22.py +++ b/pyroomacoustics/tests/test_issue_22.py @@ -14,6 +14,7 @@ If the C module is not installed (pure python fallback version), then nothing is done. """ + import numpy as np import pyroomacoustics diff --git a/pyroomacoustics/tests/test_materials.py b/pyroomacoustics/tests/test_materials.py index 141d1d3d..a0954c35 100644 --- a/pyroomacoustics/tests/test_materials.py +++ b/pyroomacoustics/tests/test_materials.py @@ -2,6 +2,7 @@ Just run the Material command with a bunch of inputs to make sure it works as expected """ + import pyroomacoustics as pra scat_test = { diff --git a/pyroomacoustics/tests/test_random_ism.py b/pyroomacoustics/tests/test_random_ism.py index bcb809a4..43bc6743 100644 --- a/pyroomacoustics/tests/test_random_ism.py +++ b/pyroomacoustics/tests/test_random_ism.py @@ -5,6 +5,7 @@ Script to test removal of sweeping echoes with randomized image method """ + import pyroomacoustics as pra from pyroomacoustics import metrics as met diff --git a/pyroomacoustics/tests/test_room_mix.py b/pyroomacoustics/tests/test_room_mix.py index 336ebb3c..6cac9989 100644 --- a/pyroomacoustics/tests/test_room_mix.py +++ b/pyroomacoustics/tests/test_room_mix.py @@ -1,6 +1,7 @@ """ Tests the mixing function of ``Room.simulate`` """ + import unittest import numpy as np diff --git a/pyroomacoustics/tests/tests_libroom/test_shoebox_simple.py b/pyroomacoustics/tests/tests_libroom/test_shoebox_simple.py index e0110d05..10d94b47 100644 --- a/pyroomacoustics/tests/tests_libroom/test_shoebox_simple.py +++ b/pyroomacoustics/tests/tests_libroom/test_shoebox_simple.py @@ -7,6 +7,7 @@ It was created to address Issue #293 on github. https://github.com/LCAV/pyroomacoustics/issues/293 """ + import numpy as np import pytest diff --git a/pyroomacoustics/transform/__init__.py b/pyroomacoustics/transform/__init__.py index 00559f93..e11fb411 100644 --- a/pyroomacoustics/transform/__init__.py +++ b/pyroomacoustics/transform/__init__.py @@ -15,7 +15,6 @@ """ - from . import stft from .dft import DFT from .stft import STFT