Skip to content

Commit

Permalink
add ruff to dependencies, update ruff to v0.2.0 conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Feb 22, 2024
1 parent deb26c2 commit a811052
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies:
- pre-commit >=3.3.2
- pytest >=7.3.1
# - pytest-cov >=4.0.0
- ruff >=0.2.0
- sphinx
- sphinx-autoapi
- sphinx-codeautolink
Expand Down
23 changes: 13 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ dev = [
"black==24.2.0",
"blackdoc==0.3.9",
"isort==5.13.2",
"pre-commit>=3.3.2"
"pre-commit>=3.3.2",
"ruff>=0.2.0"
]
docs = [
# Documentation and examples
Expand Down Expand Up @@ -238,6 +239,11 @@ exclude = [
"docs",
"tests"
]

[tool.ruff.format]
line-ending = "auto"

[tool.ruff.lint]
ignore = [
"D205",
"D400",
Expand All @@ -251,28 +257,25 @@ select = [
"W"
]

[tool.ruff.flake8-bandit]
[tool.ruff.lint.flake8-bandit]
check-typed-exception = true

[tool.ruff.format]
line-ending = "auto"

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["xhydro"]
case-sensitive = true
detect-same-package = false
lines-after-imports = 1
no-lines-before = ["future", "standard-library"]

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

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"xhydro/**/__init__.py" = ["F401", "F403"]
"tests/**/*.py" = ["D100", "D101", "D102", "D103"]

[tool.ruff.pycodestyle]
[tool.ruff.lint.pycodestyle]
max-doc-length = 180

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

0 comments on commit a811052

Please sign in to comment.