@@ -186,6 +186,9 @@ line-length = 88
186186
187187[tool .ruff .lint ]
188188select = [
189+ # flake8-annotations
190+ " ANN001" ,
191+ " ANN2" ,
189192 # pycodestyle
190193 " E" ,
191194 # Pyflakes
@@ -201,21 +204,29 @@ select = [
201204]
202205ignore = [" E501" , " D1" , " D415" ]
203206
207+ [tool .ruff .lint .per-file-ignores ]
208+ "tests/*" = [" ANN" ]
209+
204210[tool .ruff .lint .isort ]
205211known-first-party = [" commitizen" , " tests" ]
206212
207213[tool .ruff .lint .pydocstyle ]
208214convention = " google"
209215
210216[tool .mypy ]
211- files = " commitizen"
217+ files = [" commitizen" , " tests" ]
218+ disallow_untyped_defs = true
212219disallow_untyped_decorators = true
213220disallow_subclassing_any = true
214221warn_return_any = true
215222warn_redundant_casts = true
216223warn_unused_ignores = true
217224warn_unused_configs = true
218225
226+ [[tool .mypy .overrides ]]
227+ module = " tests/*"
228+ disallow_untyped_defs = false
229+
219230[[tool .mypy .overrides ]]
220231module = " py.*" # Legacy pytest dependencies
221232ignore_missing_imports = true
@@ -232,14 +243,14 @@ poetry_command = ""
232243[tool .poe .tasks ]
233244format.help = " Format the code"
234245format.sequence = [
235- { cmd = " ruff check --fix commitizen tests " },
236- { cmd = " ruff format commitizen tests " },
246+ { cmd = " ruff check --fix" },
247+ { cmd = " ruff format" },
237248]
238249
239250lint.help = " Lint the code"
240251lint.sequence = [
241- { cmd = " ruff check commitizen/ tests/ --fix " },
242- { cmd = " mypy commitizen/ tests/ " },
252+ { cmd = " ruff check" },
253+ { cmd = " mypy" },
243254]
244255
245256check-commit.help = " Check the commit message"
0 commit comments