File: ruff.toml

package info (click to toggle)
python-tatsu 5.15.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: python: 10,128; makefile: 54
file content (64 lines) | stat: -rw-r--r-- 1,900 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
line-length = 88

lint.select = [
    "F", "E", "W", "UP",
    "I", "YTT", "S", "B",
    "COM", "C4", "SIM",
    "PTH", "TRY",
    "FLY", "PERF", "FURB", "RUF",
    "PL", "PGH", "RET",
    # "ERA", # commented out code
]
lint.ignore = [
    "RUF100", # unuses ruff noqa directives
    "B019", # memory leaks possible with functools.cache
#    "C408",  # unnecessary-collection-call
    "E501",  # line-too-long
    "E741",  # ambiguous-variable-name
    "E402",  # module-import-not-at-top-of-file
    "FURB101", # use Path.read_text()
    "FURB103", # use Path.write_text()
    "FURB189",  # subclassing str
    "S101",  # use of assert
    "PERF203", # try-except within loop
    "PLC0415",  # import-outside-top-level
    "PLR6301",  # no-self-use
    "PLR0904",  # too-many-public-methods
    "PLR0913",  # too-many-arguments
    "PLR0915",  # too-many-statements
    "PLR0917",  # too many possitional arguments
    "PLR2004",  # magic-value-comparison
    "PLW1514",  # unspecified-encoding
#    "PLW0603",  # global-statement
#    "PLW2901",  # redefined-loop-name
    "PLW3201",  # bad-dunder-method-name
#    "PTH123",  # builtin-open
    "RET505",  # superfluous-else-return
    "RUF022",  # __all__ sorting
    "RUF027",  # possible f-string
    "S102",  # exec-builtin
#    "S105",  # hardcoded-password-string
    "S301",  # suspicious-pickle-usage
#    "S311",  # suspicious-non-cryptographic-random-usage
    "S403",   # insecure modules
    "SIM108",   # use ternary instead of if=else
    "SIM115",  # open-file-with-context-handler
    "SIM114",  # if-with-same-arms
    "TRY003",  # raise-vanilla-args
    "TRY300",  # try-consider-else
    "UP031",  # use of % formatting
]
exclude = [
    "docs",
]

target-version = "py312"

[lint.per-file-ignores]

[lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10

[lint.pydocstyle]
convention = "numpy"