From e96f30c29ccf7b03e9360eefae7702a5ab0c27ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:55:40 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/run_profile_pyuvsim.py | 4 +--- src/pyuvsim/simsetup.py | 15 +++++++-------- tests/test_run_ref.py | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/run_profile_pyuvsim.py b/scripts/run_profile_pyuvsim.py index c321c8bb..b681b7f9 100644 --- a/scripts/run_profile_pyuvsim.py +++ b/scripts/run_profile_pyuvsim.py @@ -19,9 +19,7 @@ parser = argparse.ArgumentParser( description=( - "A command-line script " - "to execute a pyuvsim simulation for" - "profiling purposes." + "A command-line script to execute a pyuvsim simulation forprofiling purposes." ) ) diff --git a/src/pyuvsim/simsetup.py b/src/pyuvsim/simsetup.py index bf7ef615..f26f690d 100644 --- a/src/pyuvsim/simsetup.py +++ b/src/pyuvsim/simsetup.py @@ -1086,16 +1086,16 @@ def _construct_beam_list( """ beam_list = [] - assert isinstance( - beam_ids, np.ndarray | list | tuple - ), "beam_ids must be a list, tuple or numpy array." + assert isinstance(beam_ids, np.ndarray | list | tuple), ( + "beam_ids must be a list, tuple or numpy array." + ) beam_ids = np.asarray(beam_ids, dtype=int) assert isinstance(telconfig, dict), "telconfig must be a dict." if freq_range is not None: - assert isinstance( - freq_range, np.ndarray | list | tuple - ), "If passed, freq_range must be a list, tuple or numpy array" + assert isinstance(freq_range, np.ndarray | list | tuple), ( + "If passed, freq_range must be a list, tuple or numpy array" + ) freq_range = np.asarray(freq_range, dtype=float).squeeze() if freq_range.size != 2: raise ValueError("If passed, freq_range have 2 elements") @@ -1649,8 +1649,7 @@ def parse_time_params(time_params): if not it: if not dd: raise ValueError( - "Either duration or integration time " - "must be specified: " + kws_used + "Either duration or integration time must be specified: " + kws_used ) # In seconds time_params["integration_time"] = ( diff --git a/tests/test_run_ref.py b/tests/test_run_ref.py index 679b853d..b430fe45 100644 --- a/tests/test_run_ref.py +++ b/tests/test_run_ref.py @@ -98,7 +98,7 @@ def download_sim(target_dir, sim_name): api_url = "https://repository.library.brown.edu/api/collections/bdr:wte2qah8/?q=" print( - f"\nquerying BDR collection for items matching {sim_name} via api: {api_url+sim_name}" + f"\nquerying BDR collection for items matching {sim_name} via api: {api_url + sim_name}" ) response = robust_response(api_url + sim_name)