Skip to content

Commit

Permalink
ruff: ANN compliance (#1212)
Browse files Browse the repository at this point in the history
* ruff: ANN compliance

* add changelog news fragment
  • Loading branch information
bjlittle authored Nov 19, 2024
1 parent b2eedb9 commit a49ae32
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,11 @@ lint.ignore = [
]

[lint.extend-per-file-ignores]
"conftest.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public function.
]
"src/geovista/geoplotter.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN401", # Dynamically typed expressions (typing.Any).
]
"test_*.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public funciton.
]
"test_slice_lines.py" = [
# eradicate (ERA)
# https://docs.astral.sh/ruff/rules/#eradicate-era
Expand Down
2 changes: 2 additions & 0 deletions changelog/1212.contributor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Complied with `ruff <https://github.com/astral-sh/ruff>`__
``flake8-annotations`` (``ANN``) rules. (:user:`bjlittle`)
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ max-complexity = 26
# https://docs.astral.sh/ruff/rules/print/
"T201", # flake8-print: print found.
]
"conftest.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public function.
]
"src/geovista/cli.py" = [
# https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"FBT001", # flake8-boolean-trap: Boolean-typed positional argument in function definition.
Expand All @@ -246,6 +252,12 @@ max-complexity = 26
# https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"FBT001", # flake8-boolean-trap: Boolean-typed positional argument in function definition.
]
"test_*.py" = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN001", # Missing type annotation for function argument.
"ANN201", # Missing return type annotation for public funciton.
]


[tool.ruff.lint.pydocstyle]
Expand Down

0 comments on commit a49ae32

Please sign in to comment.