@@ -187,6 +187,9 @@ line-length = 88
187187
188188[tool .ruff .lint ]
189189select = [
190+ # flake8-annotations
191+ " ANN001" ,
192+ " ANN2" ,
190193 # pycodestyle
191194 " E" ,
192195 # Pyflakes
@@ -202,21 +205,29 @@ select = [
202205]
203206ignore = [" E501" , " D1" , " D415" ]
204207
208+ [tool .ruff .lint .per-file-ignores ]
209+ "tests/*" = [" ANN" ]
210+
205211[tool .ruff .lint .isort ]
206212known-first-party = [" commitizen" , " tests" ]
207213
208214[tool .ruff .lint .pydocstyle ]
209215convention = " google"
210216
211217[tool .mypy ]
212- files = " commitizen"
218+ files = [" commitizen" , " tests" ]
219+ disallow_untyped_defs = true
213220disallow_untyped_decorators = true
214221disallow_subclassing_any = true
215222warn_return_any = true
216223warn_redundant_casts = true
217224warn_unused_ignores = true
218225warn_unused_configs = true
219226
227+ [[tool .mypy .overrides ]]
228+ module = " tests/*"
229+ disallow_untyped_defs = false
230+
220231[[tool .mypy .overrides ]]
221232module = " py.*" # Legacy pytest dependencies
222233ignore_missing_imports = true
@@ -233,14 +244,14 @@ poetry_command = ""
233244[tool .poe .tasks ]
234245format.help = " Format the code"
235246format.sequence = [
236- { cmd = " ruff check --fix commitizen tests " },
237- { cmd = " ruff format commitizen tests " },
247+ { cmd = " ruff check --fix" },
248+ { cmd = " ruff format" },
238249]
239250
240251lint.help = " Lint the code"
241252lint.sequence = [
242- { cmd = " ruff check commitizen/ tests/ --fix " },
243- { cmd = " mypy commitizen/ tests/ " },
253+ { cmd = " ruff check" },
254+ { cmd = " mypy" },
244255]
245256
246257check-commit.help = " Check the commit message"
0 commit comments