Last active
March 23, 2024 04:07
-
-
Save izikeros/8cbc53d9fd6c40b38b52bebd718fce37 to your computer and use it in GitHub Desktop.
[ruff config] The sane configuration that expands default ruff config #ruff #ruff-config #qa #python #python-qa #configuration
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
exclude = [ | |
".tox", | |
".git", | |
"docs", | |
"venv", | |
".venv", | |
"*.pyc", | |
".git", | |
"__pycache__", | |
] | |
# Same as Black. | |
line-length = 88 | |
indent-width = 4 | |
# Assume Python 3.12 | |
target-version = "py312" | |
[lint] | |
ignore = [ | |
# "C", # mccabe | |
"D100", # Missing docstring in public module | |
"D101", # Missing docstring in public class | |
"D104", # Missing docstring in public package | |
"D105", # Missing docstring in magic method | |
"D107", # Missing docstring in __init__ | |
"F405", # 'module' may be undefined, or defined from star imports | |
"N802", # function name should be lowercase | |
"E501", # line too long | |
] | |
select = [ | |
# flake8-comprehensions | |
"C4", | |
# mccgabe | |
"C9", | |
# pydocstyle | |
# "D", | |
# pep8-naming | |
"N", | |
# pycodestyle | |
"E", | |
"W", | |
# Pyflakes | |
"F", | |
# pyupgrade | |
"UP", | |
# flake8-bugbear | |
"B", | |
# flake8-simplify | |
"SIM", | |
# isort | |
"I", | |
# Ruff-specific rules | |
"RUF", | |
# Other plugins (specify) | |
# "PLR", | |
"PIE", | |
] | |
#select = ["ALL"] | |
[lint.mccabe] | |
max-complexity = 10 | |
[lint.per-file-ignores] | |
"**/tests/*" = [ | |
"D100", | |
"D101", | |
"D102", | |
"D103", | |
"E501" | |
] | |
"**/*.ipynb" = [ | |
"D100", | |
"D101", | |
"D102", | |
"D103", | |
"E501" | |
] | |
"**/notebooks/*" = [ | |
"D100", | |
"D101", | |
"D102", | |
"D103", | |
"E501" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment