Skip to content

Commit

Permalink
Move to new Ruff pyproject.toml structure
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Feb 2, 2024
1 parent 59e1e5a commit c115bdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ disallow_untyped_defs = true
python_version = "3.10"

[tool.ruff]
line-length = 88
exclude = ["docs", "build"]
target-version = "py310"

[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
Expand All @@ -156,22 +161,19 @@ 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"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["zampy"]
force-single-line = true
lines-after-imports = 2
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/fapar-lai/generate_fake_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import xarray as xr


if __name__ == "__main__":
download_path = Path("download")
ingest_path = Path("ingest")
Expand Down Expand Up @@ -46,7 +47,6 @@
ds.to_netcdf(fname, encoding=encoding)
fnames.append(Path(fname))


# Zip em up
zip_fname = "satellite-lai-fapar_2019-1.zip"
with zipfile.ZipFile(download_path / zip_fname, mode="w") as zipf:
Expand Down

0 comments on commit c115bdf

Please sign in to comment.