|
71 | 71 | [tool.pylama] |
72 | 72 | max_line_length = 160 |
73 | 73 | skip = "*/.pytest_cache/*, */.tox/*, */mypy_cache/*, ./dist, ./docs" |
| 74 | + |
| 75 | +[tool.ruff] |
| 76 | +target-version = "py310" |
| 77 | + |
| 78 | +# Same as Black. |
| 79 | +line-length = 160 |
| 80 | + |
| 81 | +exclude = [ |
| 82 | + ".bzr", |
| 83 | + ".direnv", |
| 84 | + ".eggs", |
| 85 | + ".git", |
| 86 | + ".git-rewrite", |
| 87 | + ".hg", |
| 88 | + ".mypy_cache", |
| 89 | + ".nox", |
| 90 | + ".pants.d", |
| 91 | + ".pytype", |
| 92 | + ".ruff_cache", |
| 93 | + ".svn", |
| 94 | + ".tox", |
| 95 | + ".venv", |
| 96 | + "__pypackages__", |
| 97 | + "_build", |
| 98 | + "buck-out", |
| 99 | + "build", |
| 100 | + "dist", |
| 101 | + "node_modules", |
| 102 | + "venv", |
| 103 | +] |
| 104 | + |
| 105 | +[tool.ruff.lint] |
| 106 | +select = [ |
| 107 | + "AIR", |
| 108 | + "FAST", |
| 109 | + "YTT", |
| 110 | + "ASYNC", |
| 111 | + "S1", "S2", "S302", "S303", "S304", "S305", "S306", "S307", "S31", "S32", "S401", "S402", "S406", "S407", "S408", "S409", "S41", "S5", "S601", "S602", "S604", "S605", "S606", "S607", "S609", "S61", "S7", |
| 112 | + "FBT", |
| 113 | + "B00", "B01", "B020", "B021", "B022", "B023", "B025", "B027", "B028", "B029", "B03", "B901", "B903", "B905", "B911", |
| 114 | + "A", |
| 115 | + "COM", |
| 116 | + "C4", |
| 117 | + "DTZ003", "DTZ004", "DTZ012", "DTZ901", |
| 118 | + "T10", |
| 119 | + "DJ003", "DJ01", |
| 120 | + "EM", |
| 121 | + "EXE", |
| 122 | + "FIX", |
| 123 | + "FA", |
| 124 | + "INT", |
| 125 | + "ISC", |
| 126 | + "ICN", |
| 127 | + "LOG", |
| 128 | + "G001", "G002", "G01", "G1", "G2", |
| 129 | + "INP", |
| 130 | + "PIE", |
| 131 | + "T20", |
| 132 | + "PYI", |
| 133 | + "PT", |
| 134 | + "Q", |
| 135 | + "RSE", |
| 136 | + "RET", |
| 137 | + "SIM", |
| 138 | + "SLOT", |
| 139 | + "TID", |
| 140 | + "TD001", "TD004", "TD005", "TD007", |
| 141 | + "TC", |
| 142 | + "ARG003", "ARG004", "ARG005", |
| 143 | + "PTH", |
| 144 | + "FLY", |
| 145 | + "I", |
| 146 | + "C90", |
| 147 | + "NPY", |
| 148 | + "PD", |
| 149 | + "N803", "N804", "N805", "N811", "N812", "N813", "N814", "N817", "N818", "N999", |
| 150 | + "PERF1", "PERF2", "PERF401", |
| 151 | + "E", |
| 152 | + "W", |
| 153 | + "DOC202", "DOC403", "DOC502", |
| 154 | + "D2", "D3", "D402", "D403", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D413", "D414", "D416", |
| 155 | + "F", |
| 156 | + "PGH", |
| 157 | + "PLC", |
| 158 | + "PLE", |
| 159 | + "PLR01", "PLR02", "PLR04", "PLR0915", "PLR1711", "PLR1704", "PLR1714", "PLR1716", "PLR172", "PLR173", "PLR2044", "PLR5", "PLR6104", "PLR6201", |
| 160 | + "PLW", |
| 161 | + "UP", |
| 162 | + "FURB", |
| 163 | + "RUF", |
| 164 | + "TRY003", "TRY004", "TRY2", "TRY300", "TRY401", |
| 165 | +] |
| 166 | +ignore = [ |
| 167 | + # ignore for now: |
| 168 | + "S101", "N803", "N999", "PLR6201", |
| 169 | + "S602", "FBT002", "FBT001", "RUF001", "N812", "PLW0603", "PLW0602", |
| 170 | + "PLW2901", "PIE810", "PERF203", "FIX004", "N818", |
| 171 | + "RUF067", |
| 172 | + # end for now. |
| 173 | + "COM812", "D203", |
| 174 | + "T201", # print statements are ok |
| 175 | + "SIM102", |
| 176 | + "RUF012", |
| 177 | + "D205", |
| 178 | + "FIX002", # TODOs need some love but we will probably not get of them |
| 179 | + "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. |
| 180 | + "PT028", # experimental rule, incomplete |
| 181 | +] |
| 182 | + |
| 183 | +# Allow autofix for all enabled rules (when `--fix`) is provided. |
| 184 | +fixable = ["ALL"] |
| 185 | +unfixable = [] |
| 186 | +preview = true |
| 187 | + |
| 188 | +[tool.ruff.lint.per-file-ignores] |
| 189 | + |
| 190 | +[tool.ruff.lint.flake8-boolean-trap] |
| 191 | + |
| 192 | +[tool.ruff.lint.pylint] |
| 193 | +max-statements = 234 |
| 194 | + |
| 195 | +[tool.ruff.lint.mccabe] |
| 196 | +max-complexity = 70 # value is far from perfect (recommended default is 10). But we will try to decrease it over the time. |
0 commit comments