From ed50992ba5f01d9236ba081a1d925192448f621d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 18:39:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- simpleDS/delay_spectrum.py | 3 --- simpleDS/parameter.py | 3 +-- simpleDS/tests/test_delay_spectrum.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/simpleDS/delay_spectrum.py b/simpleDS/delay_spectrum.py index 3df5de2..84657fd 100644 --- a/simpleDS/delay_spectrum.py +++ b/simpleDS/delay_spectrum.py @@ -1244,7 +1244,6 @@ def update_cosmology(self, cosmology=None, littleh_units=False): # If power spectrum estimation has already occurred, need to re-normalize # in the new cosmological framework. if self.power_array is not None: - if self.power_array.unit.is_equivalent((units.Jy * units.Hz) ** 2): # This additoinal units.sr term in the c/2*K_b expression may seem # weird, however, the temperature to Jy conversion factor is defined @@ -1316,7 +1315,6 @@ def update_cosmology(self, cosmology=None, littleh_units=False): self.noise_power = self.noise_power << units.Unit("mK^2 * Mpc^3") if self.thermal_power is not None: - integration_array = ( self.freq_array.reshape(self.Nspws, 1, self.Nfreqs) ** 4 / simple_cosmo.X2Y( @@ -1968,7 +1966,6 @@ def select( ) if not self.metadata_only: - for inds, axis in zip( [spw_inds, uv_inds, pol_inds, bl_inds, lst_inds], [0, 1, 2, 3, 4] ): diff --git a/simpleDS/parameter.py b/simpleDS/parameter.py index 838ba36..af4ef9b 100644 --- a/simpleDS/parameter.py +++ b/simpleDS/parameter.py @@ -281,7 +281,6 @@ def __eq__(self, other): return False except TypeError: try: - if not all( np.isclose(p_val, other_val) for p_val, other_val in zip(parm, other_parm) @@ -333,7 +332,7 @@ def __eq__(self, other): self_lower[key], other_lower[key] ): values_close = False - except (TypeError): + except TypeError: # this isn't a type that can be # handled by np.isclose, # test for equality diff --git a/simpleDS/tests/test_delay_spectrum.py b/simpleDS/tests/test_delay_spectrum.py index 2904223..ae5bdb2 100644 --- a/simpleDS/tests/test_delay_spectrum.py +++ b/simpleDS/tests/test_delay_spectrum.py @@ -219,7 +219,7 @@ def test_properties(self): this_param = getattr(self.dspec_object, v) try: assert rand_num == this_param.value - except (AssertionError): + except AssertionError: print( "setting {prop_name} to a random number failed".format(prop_name=k) )