We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey!
What do you think, would it make sense to replace flake8 with Ruff and make mypy config more strict?
Running mypy in a more strict mode results in the following:
$ mypy src ... Found 21 errors in 9 files (checked 36 source files)
And the same with Ruff:
$ ruff check src ... Found 90 errors.
Below is the used config (assuming the project supports any Python version from 3.8 onwards):
[tool.mypy] # basic python-version = "3.8" exclude = ['^tests/assets/'] # be strict(ish) disallow_untyped_calls = true disallow_untyped_defs = true check_untyped_defs = true strict_equality = true no_implicit_optional = true # warnings warn_unused_ignores = true warn_unreachable = true warn_redundant_casts = true warn_unused_configs = true [tool.ruff] select = [ "E", "F", "B", "W", "C4", "PIE", "RET", "SIM", "RUF", "C90", "UP", "ERA", "ARG", "TID", "PERF", "SLF", "PTH", "FURB", "I", "PL", ] ignore = [ "E501", # line-too-long "PLR0913", # Too many arguments in function definition "PLR2004", # Magic value used in comparison" ] # Exclude a variety of commonly ignored directories. exclude = [".git", ".mypy_cache", ".ruff_cache"] per-file-ignores = {} # Same as Black. line-length = 99 # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.mccabe] max-complexity = 10
The text was updated successfully, but these errors were encountered:
I like the idea, happy to consider a pull request!
Sorry, something went wrong.
No branches or pull requests
Hey!
What do you think, would it make sense to replace flake8 with Ruff and make mypy config more strict?
Running mypy in a more strict mode results in the following:
And the same with Ruff:
Below is the used config (assuming the project supports any Python version from 3.8 onwards):
The text was updated successfully, but these errors were encountered: