forked from translate/translate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
128 lines (125 loc) · 6.6 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"setuptools_scm>=6.2"
]
[tool.isort]
known_third_party = [
"iniparse",
"lxml",
"vobject",
"sphinx",
"pytest",
"cheroot",
"phply",
"bs4",
"ruamel",
"pyparsing",
"setuptools"
]
profile = "black"
[tool.ruff]
output-format = "github"
target-version = "py38"
[tool.ruff.lint]
# CONFIG - intentional configuration
# TODO - needs decision whether intention, add noqa tags or fix
# WONTFIX - not fixable in current codebase, might be better to go for noqa
ignore = [
"PT013", # TODO: Found incorrect import of pytest, use simple `import pytest` instead
"PT009", # TODO: Use a regular `assert` instead of unittest-style `assertCountEqual`
"PLE0604", # TODO: Invalid object in `__all__`, must contain only strings
"PLW1510", # TODO: `subprocess.run` without explicit `check` argument
"SLOT000", # TODO: Subclasses of `str` should define `__slots__`
"B028", # TODO: No explicit `stacklevel` keyword argument found
"TRY301", # TODO: Abstract `raise` to an inner function
"B006", # TODO: Do not use mutable data structures for argument defaults
"PLR0913", # TODO: Too many arguments in function definition
"PERF203", # TODO: `try`-`except` within a loop incurs performance overhead
"ERA001", # TODO: Found commented-out code
"B023", # TODO: Function definition does not bind loop variable
"SIM115", # TODO: Use context handler for opening files
"E741", # TODO: Ambiguous variable name:
"B007", # TODO: Loop control variable not used within loop body
"B020", # TODO: Loop control variable `node` overrides iterable it iterates
"PLW2901", # TODO: `for` loop variable `input_unit` overwritten by assignment target
"TD004", # TODO: Missing colon in TODO
"TD005", # TODO: Missing issue description after `TODO`
"TD007", # TODO: Missing space after colon in TODO
"SLF001", # TODO: Private member accessed
"RUF012", # TODO: Mutable class attributes should be annotated with `typing.ClassVar`
"TRY003", # WONTFIX: Avoid specifying long messages outside the exception class
"SIM102", # TODO: Use a single `if` statement instead of nested `if` statements
"ANN", # TODO: type annotations missing
"COM", # CONFIG: No trailing commas
"DTZ005", # TODO: The use of `datetime.datetime.now()` without `tz` argument is not allowed
"D1", # TODO: Missing docstring
"PT011", # TODO: `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
"D205", # TODO: 1 blank line required between summary line and description
"D401", # TODO: First line of docstring should be in imperative mood
"D402", # TODO: First line should not be the function's signature
"D404", # TODO: First word of the docstring should not be "This"
"D203", # CONFIG: incompatible with D211
"D212", # CONFIG: incompatible with D213
"B904", # TODO: Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"BLE001", # WONTFIX: Do not catch blind exception: `Exception`, third-party modules do not have defined exceptions
"ARG001", # TODO: Unused function argument (mostly for API compatibility)
"ARG002", # TODO: Unused method argument (mostly for API compatibility)
"ARG004", # TODO: Unused static method argument
"ARG005", # TODO: Unused lambda argument:
"TD002", # CONFIG: no detailed TODO documentation is required
"TD003", # CONFIG: no detailed TODO documentation is required
"S603", # CONFIG: `subprocess` call: check for execution of untrusted input
"S607", # CONFIG: executing system installed tools
"PD011", # WONTFIX: Use `.to_numpy()` instead of `.values
"FIX001", # TODO: Line contains FIXME, consider resolving the issue
"FIX002", # CONFIG: we use TODO
"S101", # CONFIG: Use of `assert` detected
"FIX003", # TODO: Line contains XXX, consider resolving the issue
"TD001", # TODO: Invalid TODO tag: `FIXME`
"FIX004", # TODO: Line contains HACK, consider resolving the issue
"N801", # TODO: Class name should use CapWords convention
"N802", # TODO: Function name `FAIL` should be lowercase
"N803", # TODO: Argument name `attributeValue` should be lowercase
"N806", # TODO: Variable `sourcelanguageNode` in function should be lowercase
"N813", # TODO: Camelcase `StateEnum` imported as lowercase `state`
"N815", # TODO: Variable `bodyNode` in class scope should not be mixedCase
"N816", # TODO: Variable `theDOMImplementation` in global scope should not be mixedCase
"N818", # TODO: Exception name `FilterFailure` should be named with an Error suffix
"PLR2004", # TODO: Magic value used in comparison, consider replacing with a constant variable
"PLR0911", # TODO: Too many return statements
"PLR0912", # TODO: Too many branches
"PLR0915", # TODO: Too many statements
"C901", # TODO: too complex
"FBT", # TODO: Boolean in function definition
"EM", # TODO: Exception strings
"E501", # WONTFIX: we accept long strings (rest is formatted by black)
"RUF001", # WONTFIX: String contains ambiguous unicode character, we are using Unicode
"RUF002", # WONTFIX: Docstring contains ambiguous
"RUF003", # WONTFIX: Comment contains ambiguous
"T201", # TODO: `print` found
"A001", # TODO: Variable is shadowing a Python builtin
"A002", # TODO: overriding builtins (might need noqa tags)
"A003", # TODO: Class attribute `map` is shadowing a Python builtin
"S320", # TODO: Using `lxml` to parse untrusted data is known to be vulnerable to XML attacks
"S324", # TODO: Probable use of insecure hash functions in `hashlib`: `md5`
"S311", # TODO: Standard pseudo-random generators are not suitable for cryptographic purposes
"S301", # TODO: `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
"S105", # TODO: Possible hardcoded password assigned
"S307", # TODO: Use of possibly insecure function; consider using `ast.literal_eval`
"S310", # TODO: Audit URL open for permitted schemes.
"PLE2502", # TODO: Contains control characters that can permit obfuscated code
"INP001", # TODO: File is part of an implicit namespace package. Add an `__init__.py`.
"TID252", # TODO: Relative imports from parent modules are banned
"D409", # TODO: Section underline should match the length of its name
"D206", # CONFIG: formatter
'ISC001', # CONFIG: formatter
'Q000', # CONFIG: formatter
'Q001', # CONFIG: formatter
'Q002', # CONFIG: formatter
'Q003', # CONFIG: formatter
'W191', # CONFIG: formatter
"PTH" # TODO: Not using pathlib for now
]
select = ["ALL"]