Skip to content

Commit

Permalink
Add ruff support
Browse files Browse the repository at this point in the history
Add a dedicated ruff.toml file for configuring ruff
  • Loading branch information
markusritschel committed Aug 16, 2024
1 parent 513db26 commit 021d90c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions {{ cookiecutter.project_slug }}/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies:
- pandas
- pytest
- python-dotenv
- ruff
- tqdm
- xarray
- pip
1 change: 1 addition & 0 deletions {{ cookiecutter.project_slug }}/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ click
{% endif %}
pytest
pytest-cov
ruff
29 changes: 29 additions & 0 deletions {{ cookiecutter.project_slug }}/ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://docs.astral.sh/ruff/ for settings
line-length = 88
indent-width = 4


[format]
quote-style = "double"
indent-style = "space"
docstring-code-format = false


[lint]
extend-select = [
# pydocstyle
"D",
# pycodestyle
"E",
# Pyflakes
"F",
]

ignore = ["F403", "F405"]

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"


[lint.pydocstyle]
convention = "numpy"

0 comments on commit 021d90c

Please sign in to comment.