Skip to content

Commit

Permalink
fix: codespell ignore and ruff deprecation warning (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello authored Jun 5, 2024
1 parent 81010bf commit 0363eb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ target-version = ["py38"]
[tool.ruff]
line-length = 99
extend-exclude = ["__pycache__", "*.egg_info"]

[tool.ruff.lint]
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", "RET504", "C901"]
# 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 All @@ -43,3 +45,7 @@ pythonPlatform = "All"

[tool.pytest.ini_options]
asyncio_mode = "auto"

[tool.codespell]
skip = ".git,.tox,build,venv*"
ignore-words-list = "assertIn"
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ deps =
black
ruff
commands =
ruff --fix {[vars]all_path}
ruff check --fix {[vars]all_path}
black {[vars]all_path}

[testenv:lint]
Expand All @@ -38,9 +38,8 @@ deps =
ruff
codespell
commands =
codespell {[vars]lib_path}
codespell . --skip .git --skip .tox --skip build --skip lib --skip venv* --skip .mypy_cache
ruff {[vars]all_path}
codespell .
ruff check {[vars]all_path}
black --check --diff {[vars]all_path}

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

0 comments on commit 0363eb0

Please sign in to comment.