|
| 1 | +# Exclude a variety of commonly ignored directories. |
| 2 | +exclude = [ |
| 3 | + ".bzr", |
| 4 | + ".direnv", |
| 5 | + ".eggs", |
| 6 | + ".git", |
| 7 | + ".git-rewrite", |
| 8 | + ".hg", |
| 9 | + ".ipynb", |
| 10 | + ".ipynb_checkpoints", |
| 11 | + ".mypy_cache", |
| 12 | + ".nox", |
| 13 | + ".pants.d", |
| 14 | + ".pyenv", |
| 15 | + ".pytest_cache", |
| 16 | + ".pytype", |
| 17 | + ".ruff_cache", |
| 18 | + ".svn", |
| 19 | + ".tox", |
| 20 | + ".venv", |
| 21 | + ".vscode", |
| 22 | + "__pypackages__", |
| 23 | + "_build", |
| 24 | + "buck-out", |
| 25 | + "build", |
| 26 | + "dist", |
| 27 | + "node_modules", |
| 28 | + "site-packages", |
| 29 | + "venv", |
| 30 | +] |
| 31 | + |
| 32 | +# Same as Black. |
| 33 | +line-length = 120 |
| 34 | +indent-width = 4 |
| 35 | + |
| 36 | +# Assume Python 3.12 |
| 37 | +target-version = "py312" |
| 38 | + |
| 39 | +[lint] |
| 40 | +preview = true |
| 41 | +explicit-preview-rules = true |
| 42 | +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. |
| 43 | +select = [ |
| 44 | + "A", # flake8-builtins |
| 45 | + "AIR", # Airflow |
| 46 | + "ANN", # flake8-annotations |
| 47 | + "ARG", # flake8-unused-arguments |
| 48 | + "ASYNC", # flake8-async |
| 49 | + "B", # flake8-bugbear |
| 50 | + "BLE", # flake8-blind-except |
| 51 | + "C4", # flake8-comprehensions |
| 52 | + "C90", # McCabe cyclomatic complexity |
| 53 | + "COM", # flake8-commas |
| 54 | + "CPY", # flake8-copyright |
| 55 | + # "D", # pydocstyle |
| 56 | + # "DJ", # flake8-django |
| 57 | + # "DOC", # pydoclint |
| 58 | + "DTZ", # flake8-datetimez |
| 59 | + "E", # pycodestyle |
| 60 | + "EM", # flake8-errmsg |
| 61 | + "ERA", # eradicate |
| 62 | + # "EXE", # flake8-executable |
| 63 | + "F", # Pyflakes |
| 64 | + "FA", # flake8-future-annotations |
| 65 | + "FAST", # FastAPI |
| 66 | + "FBT", # flake8-boolean-trap |
| 67 | + "FIX", # flake8-pp |
| 68 | + "FLY", # flynt |
| 69 | + "FURB", # refurb |
| 70 | + "G", # flake8-logging-format |
| 71 | + "I", # isort |
| 72 | + "ICN", # flake8-import-conventions |
| 73 | + "INP", # flake8-no-pep420 |
| 74 | + "INT", # flake8-gettext |
| 75 | + "ISC", # flake8-implicit-str-concat |
| 76 | + "LOG", # flake8-logging |
| 77 | + "N", # pep8-naming |
| 78 | + "NPY", # NumPy-specific rules |
| 79 | + # "PD", # pandas-vet |
| 80 | + "PERF", # Perflint |
| 81 | + "PGH", # pygrep-hooks |
| 82 | + "PIE", # flake8-pie |
| 83 | + "PL", # Pylint |
| 84 | + "PT", # flake8-pytest-style |
| 85 | + "PTH", # flake8-use-pathlib |
| 86 | + "PYI", # flake8-pyi |
| 87 | + "Q", # flake8-quotes |
| 88 | + "R", # Refactor |
| 89 | + "RET", # flake8-return |
| 90 | + "RSE", # flake8-raise |
| 91 | + "RUF", # Ruff-specific rules |
| 92 | + "S", # flake8-bandit |
| 93 | + "SIM", # flake8-simplify |
| 94 | + "SLF", # flake8-self |
| 95 | + "SLOT", # flake8-slots |
| 96 | + "T10", # flake8-debugger |
| 97 | + "T20", # flake8-print |
| 98 | + "TCH", # flake8-type-checking |
| 99 | + "TD", # flake8-todos |
| 100 | + "TID", # flake8-tidy-imports |
| 101 | + "TRY", # tryceratops |
| 102 | + "UP", # pyupgrade |
| 103 | + "W", # pycodestyle |
| 104 | + "YTT", # flake8-2020 |
| 105 | +] |
| 106 | +ignore = ["COM812","E501","F401","ISC001",] |
| 107 | + |
| 108 | +# Allow fix for all enabled rules (when `--fix`) is provided. |
| 109 | +fixable = ["ALL"] |
| 110 | +unfixable = [] |
| 111 | + |
| 112 | +# Allow unused variables when underscore-prefixed. |
| 113 | +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
| 114 | + |
| 115 | +[format] |
| 116 | +preview = true |
| 117 | +# Like Black, use double quotes for strings. |
| 118 | +quote-style = "double" |
| 119 | + |
| 120 | +# Like Black, indent with spaces, rather than tabs. |
| 121 | +indent-style = "space" |
| 122 | + |
| 123 | +# Like Black, respect magic trailing commas. |
| 124 | +skip-magic-trailing-comma = false |
| 125 | + |
| 126 | +# Like Black, automatically detect the appropriate line ending. |
| 127 | +line-ending = "auto" |
0 commit comments