|
| 1 | +# Maximum line length for the entire project |
| 2 | +line-length = 120 |
| 3 | +# Target Python version |
| 4 | +target-version = "py311" |
| 5 | +# |
| 6 | +## Exclude directories with Jinja template variables in their names |
| 7 | +#exclude = ["**/[{][{]*/", "**/*[}][}]*/"] |
| 8 | +# |
| 9 | +#[lint] |
| 10 | +## Available rule sets in Ruff: |
| 11 | +## A: flake8-builtins - Check for python builtins being used as variables or parameters |
| 12 | +## B: flake8-bugbear - Find likely bugs and design problems |
| 13 | +## C4: flake8-comprehensions - Helps write better list/set/dict comprehensions |
| 14 | +## D: pydocstyle - Check docstring style |
| 15 | +## E: pycodestyle errors - PEP 8 style guide |
| 16 | +## ERA: eradicate - Find commented out code |
| 17 | +## F: pyflakes - Detect logical errors |
| 18 | +## I: isort - Sort imports |
| 19 | +## N: pep8-naming - Check PEP 8 naming conventions |
| 20 | +## PT: flake8-pytest-style - Check pytest best practices |
| 21 | +## RUF: Ruff-specific rules |
| 22 | +## S: flake8-bandit - Find security issues |
| 23 | +## SIM: flake8-simplify - Simplify code |
| 24 | +## T10: flake8-debugger - Check for debugger imports and calls |
| 25 | +## UP: pyupgrade - Upgrade syntax for newer Python |
| 26 | +## W: pycodestyle warnings - PEP 8 style guide warnings |
| 27 | +## ANN: flake8-annotations - Type annotation checks |
| 28 | +## ARG: flake8-unused-arguments - Unused arguments |
| 29 | +## BLE: flake8-blind-except - Check for blind except statements |
| 30 | +## COM: flake8-commas - Trailing comma enforcement |
| 31 | +## DTZ: flake8-datetimez - Ensure timezone-aware datetime objects |
| 32 | +## EM: flake8-errmsg - Check error message strings |
| 33 | +## FBT: flake8-boolean-trap - Boolean argument checks |
| 34 | +## ICN: flake8-import-conventions - Import convention enforcement |
| 35 | +## ISC: flake8-implicit-str-concat - Implicit string concatenation |
| 36 | +## NPY: NumPy-specific rules |
| 37 | +## PD: pandas-specific rules |
| 38 | +## PGH: pygrep-hooks - Grep-based checks |
| 39 | +## PIE: flake8-pie - Miscellaneous rules |
| 40 | +## PL: Pylint rules |
| 41 | +## Q: flake8-quotes - Quotation style enforcement |
| 42 | +## RSE: flake8-raise - Raise statement checks |
| 43 | +## RET: flake8-return - Return statement checks |
| 44 | +## SLF: flake8-self - Check for self references |
| 45 | +## TCH: flake8-type-checking - Type checking imports |
| 46 | +## TID: flake8-tidy-imports - Import tidying |
| 47 | +## TRY: flake8-try-except-raise - Try/except/raise checks |
| 48 | +## YTT: flake8-2020 - Python 2020+ compatibility |
| 49 | +# |
| 50 | +## Selected rule sets to enforce: |
| 51 | +## D: pydocstyle - Check docstring style |
| 52 | +## E: pycodestyle errors - PEP 8 style guide |
| 53 | +## F: pyflakes - Detect logical errors |
| 54 | +## I: isort - Sort imports |
| 55 | +## N: pep8-naming - Check PEP 8 naming conventions |
| 56 | +## W: pycodestyle warnings - PEP 8 style guide warnings |
| 57 | +## UP: pyupgrade - Upgrade syntax for newer Python |
| 58 | +#select = ["D", "E", "F", "I", "N", "W", "UP"] |
| 59 | +# |
| 60 | +## Resolve incompatible pydocstyle rules: prefer D211 and D212 over D203 and D213 |
| 61 | +#ignore = ["D203", "D213"] |
| 62 | +# |
| 63 | +#[lint.pydocstyle] |
| 64 | +#convention = "google" |
| 65 | +# |
| 66 | +## Formatting configuration |
| 67 | +#[format] |
| 68 | +## Use double quotes for strings |
| 69 | +#quote-style = "double" |
| 70 | +## Use spaces for indentation |
| 71 | +#indent-style = "space" |
| 72 | +## Automatically detect and use the appropriate line ending |
| 73 | +#line-ending = "auto" |
| 74 | +# |
| 75 | +## File-specific rule exceptions |
| 76 | +#[lint.per-file-ignores] |
| 77 | +#"tests/**/*.py" = ["S101"] # Allow assert statements in tests |
| 78 | +#"book/marimo/*.py" = ["N803", "S101"] # Allow non-lowercase variable names (N803) |
| 79 | +# # and assert statements in marimo files |
0 commit comments