-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathruff.toml
80 lines (77 loc) · 2.65 KB
/
ruff.toml
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
77
78
79
80
preview = true
exclude = [
"src/app/modules/superadmin",
"src/app/modules/wallet",
"scripts/",
"doc/",
"data/",
"not-used-yet/",
#
"docker/run.py",
"e2e_playwright/conftest.py",
"features/steps/steps.py",
"gunicorn.conf.py",
"icons/tasks.py",
"nua/nua-install-build-agent.py",
]
lint.select = [
"ALL",
]
lint.ignore = [
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"COM", # flake8-commas
"CPY", # Copyright headers
"D", # pydocstyle
"EM", # flake8-errmsg
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"INP", # flake8-no-pep420
"PERF", # Perflint
"PGH", # pygrep-hooks
"SLF", # flake8-self
"TD", # flake8-todos
"TRY", # tryceratops
#
"PLR6104", # broken
#
"A001", # Variable `...` is shadowing a python builtin
"A002", # Argument `...` is shadowing a python builtin
"B019", # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
"E501", # line too long
"E711", # SQLA idiom
"E712", # SQLA idiom
"FLY002", # Consider f-string instead of string join
"I001", # Import block is un-sorted or un-formatted
"N805", # First argument of a method should be named `self`
"PLC0415", # `import` should be at the top-level of a file
"PLR0911", # Too many return statements
"PLR6301",
"PLW3201", # Bad or misspelled dunder method name
"RET504", # Unnecessary variable assignment before `return` statement
"RET505", # Unnecessary `else` after `return` statement
"S101", # Use of `assert` detected
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"SIM108", # Use ternary operator
"TID252", # Relative imports from parent modules are banned
"PLW1514", # `pathlib.Path(...).read_text` without explicit `encoding` argument
#
# Fixable?
#
"BLE001", # Do not catch blind exception
"ERA001", # [*] Found commented-out code
"N801",
"PLR2004", # Magic value used in comparison
"PLR2044", # Line w/ empty comment
"RUF001", # String contains ambiguous unicode character
"RUF002", # Docstring contains ambiguous unicode character
"RUF003", # Comment contains ambiguous unicode character
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S105", # Possible hardcoded password
"S404", # `subprocess` module is possibly insecure
"S603", # Using subprocess
"T201", # `print` found
"TCH001", # Move import into a type-checking block
"TCH002", # Move import into a type-checking block
"TCH003", # Move import into a type-checking block
]