|
| 1 | +[tool.black] |
| 2 | +line-length = 120 |
| 3 | +target-version = ["py311"] |
| 4 | + |
| 5 | +[tool.isort] |
| 6 | +line_length = 120 |
| 7 | +profile = "black" |
| 8 | +py_version = 311 |
| 9 | +use_parentheses = true |
| 10 | +## Ignore the source of the import and just sort alphabetically, with "from" before "import" |
| 11 | +combine_as_imports = true |
| 12 | +combine_straight_imports = true |
| 13 | +from_first = true |
| 14 | +lines_between_sections = 0 |
| 15 | +no_sections = true |
| 16 | + |
| 17 | +[tool.pytest.ini_options] |
| 18 | +# Disable warnings from third-party libraries |
| 19 | +filterwarnings = "ignore::DeprecationWarning" |
| 20 | + |
| 21 | + |
| 22 | +[tool.ruff] |
| 23 | +extend-ignore = [ |
| 24 | + "DTZ003", |
| 25 | + "DTZ007", |
| 26 | + "E401", # multiple imports on one line |
| 27 | + "N817", # D for decimal |
| 28 | + "PLR0912", # Don't compplain about too many branches |
| 29 | + "PLR0913", # don't complain about too many arguments |
| 30 | + "PLR2004", # Don't force every magic value to be a constant |
| 31 | + "PLW0120", # else without a break is fine (I use return with for-else) |
| 32 | + "RET505", # Allow for return values to be set outside of if/else blocks |
| 33 | + "RET506", # Allow for return values to be set after raising an exception |
| 34 | + "RET507", # Allow for return values to be set after continue |
| 35 | + "RET508", # Allow for return values to be set after break |
| 36 | + "S101", # assert |
| 37 | + "S105", # possible hardcoded password |
| 38 | + "S308", # Trust us with mark_safe |
| 39 | + "S311", # Trust us with random |
| 40 | + "S324", # Trust us with hashlib |
| 41 | + "SIM108", # Don't force ternary operators |
| 42 | + "TRY003", # long messages in exceptions are ok |
| 43 | +] |
| 44 | +# https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf |
| 45 | +line-length = 120 |
| 46 | +select = [ |
| 47 | + # Note, don't use isort through ruff, it's not as configurable as the standalone tool |
| 48 | + "A", # builtins |
| 49 | + #"ARG", # unused arguments |
| 50 | + "B", # bugbear |
| 51 | + "DJ", # django |
| 52 | + "DTZ", # datetimez |
| 53 | + "E", # pycodestyle |
| 54 | + "EXE", # executable settings |
| 55 | + "F", # pyflakes |
| 56 | + "INP", # implicit namespace packages |
| 57 | + "ISC", # string concatenation |
| 58 | + "N", # pep8 naming |
| 59 | + "NPY", # numpy |
| 60 | + "PD", # pandas checking |
| 61 | + "PGH", # explicit noqa |
| 62 | + "PIE", # flake8 pie |
| 63 | + "PLC", # pylint convention |
| 64 | + "PLE", # pylint errors |
| 65 | + "PLR", # pylint refactor |
| 66 | + "PLW", # pylint warnings |
| 67 | + #"PT", # pytest style |
| 68 | + "PTH", # Use path library |
| 69 | + "RET", # return statements |
| 70 | + "RSE", # raise statements |
| 71 | + #"RUF", # ruff Disabled because it is too aggressive about removing noqa settings when editing files |
| 72 | + "S", # flake8-bandit |
| 73 | + "SIM", # flake8 simplify |
| 74 | + "SLF", # self |
| 75 | + "T10", # debug statements |
| 76 | + "T20", # print statements |
| 77 | + "TRY", # try/except |
| 78 | + "UP", # pyupgrade |
| 79 | + "W", # pycodestyle warnings |
| 80 | + "YTT", # flake8 2020 |
| 81 | +] |
| 82 | +target-version = "py311" |
| 83 | +# Certain errors we don't want to fix because they are too aggressive, |
| 84 | +# especially in the editor (removing variables we haven't used yet |
| 85 | +unfixable = ["F401", "F841"] |
0 commit comments