-
Notifications
You must be signed in to change notification settings - Fork 98
/
ruff.toml
105 lines (97 loc) · 2.9 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
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
lint.select = [
'ALL',
]
lint.exclude = [
# exclude any hello/sample scripts
'Hello.py',
]
lint.ignore = [
# we do not type annotate everything at this time
'ANN',
'RUF012',
# various translator/role/etc. definitions may not use all/any arguments
'ARG001',
'ARG002',
# we are a bit complex for now
'C90',
'PLR0911',
'PLR0912',
'PLR0913',
'PLR0915',
# ignore pydocstyle
'D',
# ignore line too long lengths; as we aim to provide implementation that
# does not exceed the 80 character limit, there use cases such as various
# imports which have long entries (namespaces plus classnames) which do
# exceed these limits
'E501',
# ignore eradicate since spdx ids and parenthesis are false flagged
'ERA001',
# imports are sorted lexicographically in this project
'FBT002',
'I001',
# select class/roles/etc. follow docutils/Sphinx casing convention
'N801',
'N802',
'N815',
# we define "constants" in uppercase in various locations
'N806',
# permit import aliases with case changes
'N812',
'N813',
# prevent false-positives with pandas checks
'PD',
# dict-kwargs usage is preferred formatting for translators
'PIE804',
# most "magic numbers" usages are acceptable in this extension (http codes)
'PLR2004',
# ignore indentation concerns when readability is preferred
'PLR5501',
# project uses unittest module
'PT',
# single quotes are preferred in this project
'Q000',
'Q001',
# use of asserts are acceptable for this extension
'S101',
# allow nested ifs when readability/line-length is preferred
'SIM102',
# prefer bool-returning conditional checks over casts for readability
'SIM103',
# allow non-ternary operators when readability/line-length is preferred
'SIM108',
# ignore combining ifs that are best presented separated
'SIM114',
# ignore flake8-print since we support/expect printing
'T20',
]
[lint.per-file-ignores]
'doc/conf.py' = [
# sphinx configuration options may shadow
'A001',
# not an implicit namespace package
'INP001',
]
'sphinxcontrib/confluencebuilder/storage/translator.py' = [
# ignore private member access warnings for custom/managed node flags
'SLF001',
]
'tests/sample-sets/config.py' = [
# ignore all in environment configuration file
'ALL',
]
'tests/unit-tests/test_config_postfix_formatting.py' = [
# ignore warnings about using private methods for our own class we
# are trying to test
'SLF001',
]
'tests/unit-tests/test_config_checks.py' = [
# ignore use of nested with statements as configuration entries are
# long named, and using nested with statements makes it easier to
# read without exceeding a long line length
'SIM117',
]
'tests*' = [
# ignore implicit-namespace-package warnings for the test structures used
'INP001',
]