File size: 2,232 Bytes
ba10b0c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
target-version = "py310"

# The GitHub editor is 127 chars wide.
line-length = 127

[lint]
select = ["ALL"]

ignore = [
    "ANN401", # Dynamically typed expressions (typing.Any) are disallowed
    "BLE001", # Do not catch blind exception: Exception
    "COM812", # Trailing comma missing
    "D203", # Require blank line after class declaration before docstring
    "D212", # Start multiline docstring on same line as triple-quote
    "DTZ005", # datetime without timezone
    "EM101", # Exception must not use a string literal, assign to variable first
    "EM102", # Exception must not use an f-string literal, assign to variable first
    "ERA001", # Found commented-out code
    "FBT", # Boolean argument in function definition
    "G", # Logging
    "I001", # Import block is un-sorted or un-formatted
    "N803", # Argument name should be lowercase
    "N806", # Variable in function should be lowercase
    "PERF203", # try-except within a loop incurs performance overhead
    "PLC0415", # `import` should be at the top-level of a file
    "PLR0913", # Too many arguments in function definition
    "PLR0915", # Too many statements
    "PLR2004", # Magic value used in comparison, consider replacing `20` with a constant variable
    "PLW0603", # Using the global statement to update variable is discouraged
    "PT018", # Assertion should be broken down into multiple parts
    "PTH", # Replace builtin functions with Path methods
    "RET505", # Unnecessary else after return statement
    "RUF005", # Consider [*list1, None] instead of concatenation (list1 + [None])
    "RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
    "S101", # Use of assert detected
    "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
    "SIM108", # Use ternary operator instead of `if`-`else`-block
    "TC001", # Move application import into a type-checking block
    "TC002", # Move third-party import into a type-checking block
    "TC003", # Move standard library import into a type-checking block
    "TC006", # Add quotes to type expression in `typing.cast()`
    "TRY", # Try-except suggestions
]

[lint.mccabe]
max-complexity = 10