@@ -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
@@ -197,21 +200,29 @@ select = [
197200]
198201ignore = [" E501" , " D1" , " D415" ]
199202
203+ [tool .ruff .lint .per-file-ignores ]
204+ "tests/*" = [" ANN" ]
205+
200206[tool .ruff .lint .isort ]
201207known-first-party = [" commitizen" , " tests" ]
202208
203209[tool .ruff .lint .pydocstyle ]
204210convention = " google"
205211
206212[tool .mypy ]
207- files = " commitizen"
213+ files = [" commitizen" , " tests" ]
214+ disallow_untyped_defs = true
208215disallow_untyped_decorators = true
209216disallow_subclassing_any = true
210217warn_return_any = true
211218warn_redundant_casts = true
212219warn_unused_ignores = true
213220warn_unused_configs = true
214221
222+ [[tool .mypy .overrides ]]
223+ module = " tests/*"
224+ disallow_untyped_defs = false
225+
215226[[tool .mypy .overrides ]]
216227module = " py.*" # Legacy pytest dependencies
217228ignore_missing_imports = true
@@ -228,14 +239,14 @@ poetry_command = ""
228239[tool .poe .tasks ]
229240format.help = " Format the code"
230241format.sequence = [
231- { cmd = " ruff check --fix commitizen tests " },
232- { cmd = " ruff format commitizen tests " },
242+ { cmd = " ruff check --fix" },
243+ { cmd = " ruff format" },
233244]
234245
235246lint.help = " Lint the code"
236247lint.sequence = [
237- { cmd = " ruff check commitizen/ tests/ --fix " },
238- { cmd = " mypy commitizen/ tests/ " },
248+ { cmd = " ruff check" },
249+ { cmd = " mypy" },
239250]
240251
241252check-commit.help = " Check the commit message"
0 commit comments