Skip to content

Commit

Permalink
silent too many arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang committed Jul 19, 2023
1 parent ee4360b commit c6daf5c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ extend-select = [
]
ignore = [
"PLR2004", # magic value used in comparsion (i.e. `if ndays == 28: month_is_feb`).
"PLR0913", # too many arguments
]
line-length = 88
exclude = ["docs", "build"]
Expand Down
4 changes: 2 additions & 2 deletions src/zampy/datasets/eth_canopy_height.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class EthCanopyHeight(Dataset): # noqa: D101

data_url = "https://share.phys.ethz.ch/~pf/nlangdata/ETH_GlobalCanopyHeight_10m_2020_version1/3deg_cogs/"

def download( # noqa: PLR0913
def download(
self,
download_dir: Path,
time_bounds: TimeBounds,
Expand Down Expand Up @@ -121,7 +121,7 @@ def ingest(

return True

def load( # noqa: PLR0913
def load(
self,
ingest_dir: Path,
time_bounds: TimeBounds,
Expand Down
2 changes: 1 addition & 1 deletion src/zampy/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_file_size(fpath: Path) -> int:
return fpath.stat().st_size


def cds_request( # noqa: PLR0913
def cds_request(
dataset: str,
variables: List[str],
time_bounds: TimeBounds,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_datasets/test_era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_load(self):

def test_convert(self):
"""Test convert function."""
with TemporaryDirectory() as temp_dir:
with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
_, era5_dataset = self.ingest_dummy_data(temp_dir)
era5_dataset.convert(ingest_dir=Path(temp_dir), convention="ALMA")
# TODO: finish this test when the function is complete.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_cds_request(mock_retrieve, valid_path_cds):
spatial_bounds.east,
],
"format": "netcdf",
}
},
)


Expand Down

0 comments on commit c6daf5c

Please sign in to comment.