|
| 1 | +[tool.ruff] |
| 2 | +target-version = "py311" |
| 3 | +line-length = 88 |
| 4 | + |
| 5 | +[tool.ruff.lint] |
| 6 | +ignore = [ |
| 7 | + "S101", # use of assert |
| 8 | + "D203", # 1 blank line required before class docstring |
| 9 | + "D212", # Multi-line docstring summary should start at the first line |
| 10 | + "D100", # Missing docstring in public module |
| 11 | + "D101", # Missing docstring in public module |
| 12 | + "D102", # Missing docstring in public method |
| 13 | + "D103", # Missing docstring in public module |
| 14 | + "D104", # Missing docstring in public package |
| 15 | + "D105", # Missing docstring in magic method |
| 16 | + "D107", # Missing docstring in `__init__` |
| 17 | + "D400", # First line should end with a period |
| 18 | + "D401", # First line of docstring should be in imperative mood |
| 19 | + "D205", # 1 blank line required between summary line and description |
| 20 | + "D415", # First line should end with a period, question mark, or exclamation point |
| 21 | + "D417", # Missing argument descriptions in the docstring |
| 22 | + "E501", # Line too long |
| 23 | + "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` |
| 24 | + "B008", # Do not perform function call |
| 25 | + "S110", # `try`-`except`-`pass` detected, consider logging the exception |
| 26 | + "D106", # Missing docstring in public nested class |
| 27 | + "UP007", # typer needs Optional syntax |
| 28 | + "UP038", # Use `X | Y` in `isinstance` is slower |
| 29 | + "S603", # check for execution of untrusted input |
| 30 | + "S105", # possible hard coded creds |
| 31 | +] |
| 32 | +select = [ |
| 33 | + "B", # flake8-bugbear |
| 34 | + "D", # flake8-docstrings |
| 35 | + "C4", # flake8-comprehensions |
| 36 | + "S", # flake8-bandit |
| 37 | + "F", # pyflake |
| 38 | + "E", # pycodestyle |
| 39 | + "W", # pycodestyle |
| 40 | + "UP", # pyupgrade |
| 41 | + "I", # isort |
| 42 | + "RUF", # ruff specific |
| 43 | +] |
| 44 | + |
| 45 | +[tool.ruff.lint.per-file-ignores] |
| 46 | +"tests/**/*" = [ |
| 47 | + "D100", |
| 48 | + "D101", |
| 49 | + "D102", |
| 50 | + "D103", |
| 51 | + "D104", |
| 52 | + "S101", |
| 53 | +] |
| 54 | +"setup.py" = ["D100"] |
| 55 | +"conftest.py" = ["D100"] |
| 56 | +"docs/conf.py" = ["D100"] |
| 57 | + |
| 58 | +[tool.ruff.lint.isort] |
| 59 | +known-first-party = ["pySwitchbot", "tests"] |
0 commit comments