-
Notifications
You must be signed in to change notification settings - Fork 38
/
pyproject.toml
114 lines (110 loc) · 4.75 KB
/
pyproject.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[tool.ruff]
line-length = 120
show-fixes = true
target-version = "py39"
lint.select = [
"ALL", # include all the rules, including new ones
]
extend-exclude = [
"tests/test_data/"
]
lint.ignore = [
#### modules
"DJ", # django
"PD", # pandas
#"C90", # mccabe complexity
#"EXE", # flake8-executable
#"PTH", # flake8-use-pathlib
#"TID", # flake8-tidy-imports
#### specific rules
"D100", # missing docstring in public module
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
"D107", # missing docstring in __init__
"D203", # blank line before class
"D212", # multi-line docstring summary should start at the first line
"D400", # first line should end with a period
"D415", # first line should end with period, question mark or exlamation point
"ANN204", # missing type annotation for __init__
"EM102", # exception with fstring
"TD002", # 'to do' without author
"PT011", # pytest.raises is too broad
"S101", # use of assert
"COM812", # trailing commas
"FIX002", # code with to do - check all of them later
"PERF203", # try except in for loop - check all of them for possible refactors
"C901", # code too complex (duplicate with other rules)
"EM101", # exception with string literal
"SIM108", # ternary operator - reconsider, sometimes the code readability is lower with ternary
"D205", # TODO: 1 blank line between summary and description - see if makes sense
"ANN001", # TODO: type annotation for function argument (900 issues)
"ANN002", # TODO: type annotation for private function
"ANN003", # TODO: type annotation for *kwargs
"ANN201", # TODO: type annotation for return type (800 issues)
"ANN202", # TODO: type annotation for return type of private function
"ANN205", # TODO: type annotation for return type of staticmethod (30 issues)
"FBT002", # TODO: boolean default positional argument in function definition
"RUF012", # TODO: mutable class attributes should be annotated with typing.classvar
"PLW0129", # TODO: assert on non-empty string literal
"T201", # TODO: print
"FBT003", # TODO: boolean positional value in function call
"ARG002", # TODO: unused method argument
"SLF001", # TODO: private member accessedAsnfz
"PLR0913", # TODO: too many arguments in fn def (consider if it's good to keep the rule)
"B007", # TODO: loop variable not used
"TRY003", # TODO: exception with long message outside exception class
"INP001", # TODO: file part of implicit namespace package
"A001", # TODO: variable shadowing python builtin
"A002", # TODO: argument shadowing python builtin
"FBT001", # TODO: boolean positional argument in fn def. Check if fn can be splitted on two depending on flag
"E501", # TODO: line too long
"FIX001", # TODO: code with fixme
"TD003", # TODO: code with fixme and without issue link
"TD001", # TODO: invalid TODO tag
"N818", # TODO: exception without error in name
"N999", # TODO: invalid module name unused-keyword
"PLR2004", # TODO: magic value used in comparison (50 issues)
"RET503", # TODO: missing explicit return
"PYI024", # TODO: namedtuple -> NamedTuple
"TRY201", # TODO: use raise without exception name
"PTH100", # TODO: use Path
"PTH109", # TODO: use Path
"PTH110", # TODO: use Path
"PTH111", # TODO: use Path
"PTH123", # TODO: use Path.open()
"D301", # TODO: use r if any backslashes in a docstring
"RUF013", # TODO: implicit Optional
"ANN401", # TODO: replace Any
"B009", # TODO: getattr with constant attribute value
"B028", # TODO: no explicit stacklevel in warn
"B904", # TODO: raise from
"PLR0912", # TODO: too many branches
"ERA001", # TODO: commented out code
"SIM105", # TODO: use supress
"ARG001", # TODO: unused function argument
"DTZ005", # TODO: `datetime.datetime.now()` called without a `tz` argument
]
lint.unfixable = [
# PT022 replace empty `yield` to empty `return`. Might be fixed with a combination of PLR1711
# In addition, it can't do anything with invalid typing annotations, protected by mypy.
"PT022",
]
[tool.ruff.lint.extend-per-file-ignores]
# following breaks for now with Robot Framework dynamic importing
"robocop/checkers/misc.py" = ["FA100"]
"robocop/checkers/community_rules/usage.py" = ["FA100"]
# return type for tests does not make sense
"tests/*" = ["ANN201"]
[tool.coverage.run]
omit = ["*tests*"]
source = ["robocop"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError"
]
fail_under = 90