From e2318ba66431be6cad480f895270d51e6485bc2f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 21:20:17 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pangeo_forge_recipes/transforms.py | 1 - tests/conftest.py | 1 - tests/http_auth_server.py | 1 - tests/test_openers.py | 1 - tests/test_patterns.py | 3 --- tests/test_rechunking.py | 1 - tests/test_serialization.py | 1 - tests/test_transforms.py | 1 - tests/test_writers.py | 1 - 9 files changed, 11 deletions(-) diff --git a/pangeo_forge_recipes/transforms.py b/pangeo_forge_recipes/transforms.py index bd23db664..00b7b5e7c 100644 --- a/pangeo_forge_recipes/transforms.py +++ b/pangeo_forge_recipes/transforms.py @@ -292,7 +292,6 @@ def expand(self, pcoll: beam.PCollection) -> beam.PCollection: @dataclass class StoreDatasetFragments(beam.PTransform): - target_store: beam.PCollection # side input def expand(self, pcoll: beam.PCollection) -> beam.PCollection: diff --git a/tests/conftest.py b/tests/conftest.py index fbee03ad3..490f60a01 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -152,7 +152,6 @@ def get_open_port(): def start_http_server(paths, request, username=None, password=None, required_query_string=None): - first_path = paths[0] # assume that all files are in the same directory basedir = os.path.dirname(first_path) diff --git a/tests/http_auth_server.py b/tests/http_auth_server.py index c82fc6500..50209afda 100644 --- a/tests/http_auth_server.py +++ b/tests/http_auth_server.py @@ -13,7 +13,6 @@ @click.option("--password") @click.option("--required-query-string") def serve_forever(address, port, username, password, required_query_string): - port = int(port) class Handler(http.server.SimpleHTTPRequestHandler): diff --git a/tests/test_openers.py b/tests/test_openers.py index a4f0435f8..9f0b6d3e5 100644 --- a/tests/test_openers.py +++ b/tests/test_openers.py @@ -161,7 +161,6 @@ def test_direct_open_with_xarray(public_url_and_type, load, xarray_open_kwargs): def is_valid_inline_threshold(): def _is_valid_inline_threshold(references): - assert isinstance(references[0][0]["refs"]["lat/0"], list) return _is_valid_inline_threshold diff --git a/tests/test_patterns.py b/tests/test_patterns.py index 2fe81df77..588cfd8b5 100644 --- a/tests/test_patterns.py +++ b/tests/test_patterns.py @@ -87,7 +87,6 @@ def test_pattern_from_file_sequence(): @pytest.mark.parametrize("pickle", [False, True]) def test_file_pattern_concat_merge(runtime_secrets, pickle, concat_merge_pattern_with_kwargs): - fp, times, varnames, format_function, kwargs = concat_merge_pattern_with_kwargs if runtime_secrets: @@ -155,7 +154,6 @@ def test_incompatible_kwargs(): @pytest.mark.parametrize("nkeep", [1, 2]) def test_prune(nkeep, concat_merge_pattern_with_kwargs, runtime_secrets): - fp = concat_merge_pattern_with_kwargs[0] if runtime_secrets: @@ -190,7 +188,6 @@ def get_kwargs(file_pattern): @pytest.mark.parametrize("file_type_value", [ft.value for ft in list(FileType)] + ["unsupported"]) def test_setting_file_types(file_type_value): - file_type_kwargs = {"file_type": file_type_value} if not file_type_value == "unsupported": diff --git a/tests/test_rechunking.py b/tests/test_rechunking.py index 8c43ed398..f3d72a82f 100644 --- a/tests/test_rechunking.py +++ b/tests/test_rechunking.py @@ -226,7 +226,6 @@ def test_combine_fragments_multidim(time_chunk, lat_chunk): def test_combine_fragments_errors(): - ds = make_ds(nt=1) group = (("time", 0),) # not actually used diff --git a/tests/test_serialization.py b/tests/test_serialization.py index eeeb1ae8f..2f4869f16 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -42,7 +42,6 @@ def base_pattern(end_date): def get_new_pattern_with_next_url(end_date, nitems_per_file): - fmt = "%Y-%m-%d" def increment_end_date(ndays): diff --git a/tests/test_transforms.py b/tests/test_transforms.py index a4a190ba7..ee2ffd1c8 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -151,7 +151,6 @@ def test_OpenWithKerchunk_direct(pattern_direct, pipeline): @pytest.mark.parametrize("target_chunks", [{}, {"time": 1}, {"time": 2}, {"time": 2, "lon": 9}]) def test_PrepareZarrTarget(pipeline, tmp_target_url, target_chunks): - ds = make_ds() schema = dataset_to_schema(ds) diff --git a/tests/test_writers.py b/tests/test_writers.py index 633355ff9..a9628c57f 100644 --- a/tests/test_writers.py +++ b/tests/test_writers.py @@ -15,7 +15,6 @@ def temp_store(tmp_path): def test_store_dataset_fragment(temp_store): - ds = make_ds(non_dim_coords=True) schema = ds.to_dict(data=False, encoding=True) schema["chunks"] = {}