Created
May 13, 2024 02:43
-
-
Save Nebu1eto/4358a3dce7da4cc03ae20e935ace2bdc to your computer and use it in GitHub Desktop.
Sample Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.mypy] | |
python_version = "3.10" | |
ignore_missing_imports = false | |
warn_unused_ignores = true # Warns about unneeded # type: ignore comments. | |
show_error_codes = true | |
[tool.ruff] | |
exclude = [ | |
".bzr", | |
".direnv", | |
".eggs", | |
".git", | |
".git-rewrite", | |
".hg", | |
".ipynb_checkpoints", | |
".mypy_cache", | |
".nox", | |
".pants.d", | |
".pyenv", | |
".pytest_cache", | |
".pytype", | |
".ruff_cache", | |
".svn", | |
".tox", | |
".venv", | |
".vscode", | |
"__pypackages__", | |
"_build", | |
"buck-out", | |
"build", | |
"dist", | |
"node_modules", | |
"site-packages", | |
"venv", | |
] | |
line-length = 100 | |
indent-width = 4 | |
target-version = "py310" | |
[tool.ruff.lint] | |
select = [ | |
"ASYNC", | |
"B", | |
"BLE", | |
"C4", | |
"COM", | |
"E", | |
"ERA", | |
"F", | |
"FA", | |
"FLY", | |
"I", | |
"INP", | |
"ISC", | |
"PERF", | |
"PIE", | |
"PLC", | |
"PLE", | |
"PLR", | |
"PLW", | |
"PT", | |
"PTH", | |
"PYI", | |
"Q", | |
"RET", | |
"RSE", | |
"RUF", | |
"S", | |
"SIM", | |
"SLOT", | |
"T10", | |
"TCH", | |
"TRY", | |
"UP", | |
"W", | |
"YTT", | |
] | |
ignore = [ | |
"ASYNC102", # Checks that async functions do not contain calls to blocking synchronous process calls via the os module. | |
"PLR09", # Too many {problem} | |
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable | |
"PT011", # pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception | |
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes | |
"TRY003", # Avoid specifying long messages outside the exception class | |
"TRY301", # Abstract raise to an inner function | |
"UP040", # Type alias {name} uses TypeAlias annotation instead of the type keyword - mypy does not support this yet | |
"ISC001", # Conflict | |
"COM812", # Conflict | |
] | |
task-tags = ["TODO", "FIXME"] | |
fixable = ["ALL"] | |
unfixable = [] | |
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | |
[tool.ruff.format] | |
quote-style = "double" | |
indent-style = "space" | |
skip-magic-trailing-comma = false | |
line-ending = "auto" | |
docstring-code-format = false | |
docstring-code-line-length = "dynamic" | |
[tool.ruff.lint.isort] | |
case-sensitive = true | |
force-single-line = true | |
lines-after-imports = -1 | |
lines-between-types = 0 | |
order-by-type = false | |
split-on-trailing-comma = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment