From fd8fd96eb2c24c21998c6a34fff4dbf46aa8c81a Mon Sep 17 00:00:00 2001 From: Robin Scheibler Date: Sat, 4 Jan 2025 01:57:37 +0900 Subject: [PATCH] lint --- pyroomacoustics/directivities/__init__.py | 10 +++++----- pyroomacoustics/directivities/analytic.py | 1 - pyroomacoustics/directivities/measured.py | 4 ++-- .../tests/test_cardioid_energy_distribution.py | 4 ++-- .../tests/test_measured_energy_distribution.py | 1 + pyroomacoustics/random/tests/test_distributions.py | 3 ++- pyroomacoustics/random/tests/test_rejection.py | 5 +++-- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pyroomacoustics/directivities/__init__.py b/pyroomacoustics/directivities/__init__.py index 9994569a..19b692df 100644 --- a/pyroomacoustics/directivities/__init__.py +++ b/pyroomacoustics/directivities/__init__.py @@ -83,21 +83,21 @@ """ from .analytic import ( Cardioid, + CardioidEnergyDistribution, CardioidFamily, FigureEight, HyperCardioid, Omnidirectional, SubCardioid, - cardioid_func, cardioid_energy, - CardioidEnergyDistribution, + cardioid_func, ) -from .histogram import SphericalHistogram -from .integration import spherical_integral from .base import Directivity from .direction import DirectionVector, Rotation3D +from .histogram import SphericalHistogram +from .integration import spherical_integral from .measured import ( MeasuredDirectivity, - MeasuredDirectivityFile, MeasuredDirectivityEnergyDistribution, + MeasuredDirectivityFile, ) diff --git a/pyroomacoustics/directivities/analytic.py b/pyroomacoustics/directivities/analytic.py index 08524f76..a05cd18d 100644 --- a/pyroomacoustics/directivities/analytic.py +++ b/pyroomacoustics/directivities/analytic.py @@ -62,7 +62,6 @@ from .. import random from ..doa import spher2cart from ..utilities import all_combinations, requires_matplotlib -from .. import random from .base import Directivity from .direction import DirectionVector diff --git a/pyroomacoustics/directivities/measured.py b/pyroomacoustics/directivities/measured.py index be7a9873..5f829c14 100644 --- a/pyroomacoustics/directivities/measured.py +++ b/pyroomacoustics/directivities/measured.py @@ -73,13 +73,13 @@ import numpy as np from scipy.interpolate import griddata -from scipy.spatial import cKDTree, SphericalVoronoi +from scipy.spatial import SphericalVoronoi, cKDTree from .. import random from ..acoustics import OctaveBandsFactory from ..datasets import SOFADatabase -from ..doa import Grid, GridSphere, cart2spher, fibonacci_spherical_sampling, spher2cart from ..directivities.integration import spherical_integral +from ..doa import Grid, GridSphere, cart2spher, fibonacci_spherical_sampling, spher2cart from ..parameters import constants from ..utilities import requires_matplotlib from .base import Directivity diff --git a/pyroomacoustics/directivities/tests/test_cardioid_energy_distribution.py b/pyroomacoustics/directivities/tests/test_cardioid_energy_distribution.py index 6d804751..85221e83 100644 --- a/pyroomacoustics/directivities/tests/test_cardioid_energy_distribution.py +++ b/pyroomacoustics/directivities/tests/test_cardioid_energy_distribution.py @@ -1,8 +1,8 @@ import numpy as np -import pyroomacoustics as pra - import pytest +import pyroomacoustics as pra + @pytest.mark.parametrize("p", (0.0, 0.25, 0.5, 0.75, 1.0)) def test_pdf_integral(p): diff --git a/pyroomacoustics/directivities/tests/test_measured_energy_distribution.py b/pyroomacoustics/directivities/tests/test_measured_energy_distribution.py index 65f1084b..92e65399 100644 --- a/pyroomacoustics/directivities/tests/test_measured_energy_distribution.py +++ b/pyroomacoustics/directivities/tests/test_measured_energy_distribution.py @@ -1,4 +1,5 @@ import numpy as np + import pyroomacoustics as pra diff --git a/pyroomacoustics/random/tests/test_distributions.py b/pyroomacoustics/random/tests/test_distributions.py index 8644328a..2abbc5b8 100644 --- a/pyroomacoustics/random/tests/test_distributions.py +++ b/pyroomacoustics/random/tests/test_distributions.py @@ -2,8 +2,9 @@ Tests the distribution objects for the pdf area and the sampler functions. """ -import pytest import numpy as np +import pytest + import pyroomacoustics as pra from pyroomacoustics.directivities.integration import spherical_integral diff --git a/pyroomacoustics/random/tests/test_rejection.py b/pyroomacoustics/random/tests/test_rejection.py index c5f0779c..3c3d7f6c 100644 --- a/pyroomacoustics/random/tests/test_rejection.py +++ b/pyroomacoustics/random/tests/test_rejection.py @@ -1,8 +1,9 @@ -import pyroomacoustics as pra import numpy as np -from pyroomacoustics.directivities import CardioidEnergyDistribution, SphericalHistogram import pytest +import pyroomacoustics as pra +from pyroomacoustics.directivities import CardioidEnergyDistribution, SphericalHistogram + def test_rejection_sampler_power_spherical():