File size: 2,438 Bytes
482874e
 
6383948
482874e
 
 
 
 
 
 
69c1753
482874e
6383948
 
 
 
 
 
 
3165936
482874e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69c1753
482874e
 
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
65
66
67
68
69
70
71
72
73
74
75
76
line-length = 119
# Assume the minimum Python version
target-version = 'py310'
fix = true
exclude = ["*.pyi", "*/site-packages"]

############################
# lint rules
############################
[lint]
preview = true
select = [
  "E",   # pycodestyle: Error
  "W",   # pycodestyle: Warning
  "F",   # Pyflakes
  "PLE", # pylint: Error
  "B",   # flake8-bugbear
  "TC",  # flake8-type-checking
  "I",   # isort
  # "T20",    # flake8-print
  "C4",     # flake8-comprehensions
  "UP",     # pyupgrade
  "ARG001", # unused arguments in functions
  "G",      # flake8-logging-format rules
  "LOG",    # flake8-logging rules, most of them autofixable
  "TID",    # flake8-tidy-imports
  # Per rule enables
  "ISC001", # Implicitly concatenated string literals on one line
  "TRY002", # Prohibit use of `raise Exception`, use specific exceptions instead.
  "TRY400", # Use `logging.exception` instead of `logging.error`
  "RET505", # Unnecessary {branch} after return statement
  "RET506", # Unnecessary {branch} after raise statement
  "RET507", # Unnecessary {branch} after continue statement
  "RET508", # Unnecessary {branch} after break statement
  "SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
  "SIM300", # Checks for conditions that position a constant on the left-hand side of the comparison operator, rather than the right-hand side.
  "RUF005", # collection-literal-concatenation
  "RUF006", # Checks for asyncio dangling task
  "RUF013", # implicit-optional
  "RUF015", # Checks for unnecessary iterable allocation for first element
  "RUF019", # Checks for unnecessary key check
  "RUF021", # parenthesize-chained-operators
  "RUF022", # unsorted-dunder-all
  "RUF023", # unsorted-dunder-slots
  "RUF051", # if-key-in-dict-del
  "RUF100", # unused-noqa
  "RUF101", # redirected-noqa
]
unfixable = [
  "F401", # unused imports
  "F841", # unused variables
]
ignore = [
  "B008", # do not perform function calls in argument defaults
  "E501", # Formatted code may exceed the line length, leading to line-too-long (E501) errors.
]

[lint.per-file-ignores]
# `E402` (import violations)
"__init__.py" = ["E402"]
"examples/*" = ["E402"]
"tests/*" = ["E402"]

[lint.isort]
combine-as-imports = true
known-third-party = ["bpy"]
known-first-party = []

############################
# format rules
############################
[format]
preview = true
quote-style = "preserve"
docstring-code-format = true