Skip to content

Commit

Permalink
fix ruff usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello committed Aug 20, 2024
1 parent 28ef4a9 commit 66d94cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion charm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ target-version = ["py38"]
[tool.ruff]
line-length = 99
extend-exclude = ["__pycache__", "*.egg_info"]

[tool.ruffl.int]
select = ["E", "W", "F", "C", "N", "R", "D", "I001"]
# Ignore E501 because using black creates errors with this
# Ignore D107 Missing docstring in __init__
ignore = ["E501", "D107"]
# D100, D101, D102, D103: Ignore missing docstrings in tests
per-file-ignores = {"tests/*" = ["D100","D101","D102","D103"]}

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

[tool.pyright]
Expand Down
4 changes: 2 additions & 2 deletions charm/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ deps =
black
ruff
commands =
ruff --fix {[vars]all_path}
ruff check --fix {[vars]all_path}
black {[vars]all_path}

[testenv:lint]
Expand All @@ -46,7 +46,7 @@ commands =
codespell {[vars]lib_path}
codespell . --skip .git --skip .tox --skip build --skip lib --skip venv --skip .mypy_cache --skip nginx_config.py --skip tox.ini
codespell src/nginx_config.py -L anull
ruff {[vars]all_path}
ruff check {[vars]all_path}
black --check --diff {[vars]all_path}

[testenv:static-{charm,lib}]
Expand Down

0 comments on commit 66d94cc

Please sign in to comment.