Skip to content

Commit 7ef77bb

Browse files
committed
Ruff rules ANN for type annotations
1 parent dbf22d3 commit 7ef77bb

2 files changed

Lines changed: 39 additions & 18 deletions

File tree

pyproject.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ quantum = [
6666
target-version = "py314"
6767
output-format = "full"
6868
lint.select = [
69-
# https://beta.ruff.rs/docs/rules
69+
# https://docs.astral.sh/ruff/rules
7070
"A", # flake8-builtins
71+
"ANN", # flake8-annotations
7172
"ARG", # flake8-unused-arguments
7273
"ASYNC", # flake8-async
7374
"B", # flake8-bugbear
@@ -107,7 +108,6 @@ lint.select = [
107108
"UP", # pyupgrade
108109
"W", # pycodestyle
109110
"YTT", # flake8-2020
110-
# "ANN", # flake8-annotations -- FIX ME?
111111
# "COM", # flake8-commas -- DO NOT FIX
112112
# "D", # pydocstyle -- FIX ME?
113113
# "ERA", # eradicate -- DO NOT FIX
@@ -121,6 +121,15 @@ lint.select = [
121121
]
122122
lint.ignore = [
123123
# `ruff rule S101` for a description of that rule
124+
"ANN001", # missing-type-function-argument
125+
"ANN002", # missing-type-args
126+
"ANN003", # missing-type-kwargs
127+
"ANN201", # missing-return-type-undocumented-public-function
128+
"ANN202", # missing-return-type-private-function
129+
"ANN204", # missing-return-type-special-method
130+
"ANN205", # missing-return-type-static-method
131+
"ANN206", # missing-return-type-class-method
132+
"ANN401", # any-type
124133
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` -- FIX ME
125134
"B905", # `zip()` without an explicit `strict=` parameter -- FIX ME
126135
"EM101", # Exception must not use a string literal, assign to a variable first

uv.lock

Lines changed: 28 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)