forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.sourcery.yaml
149 lines (144 loc) · 3.96 KB
/
.sourcery.yaml
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
ignore:
- CommonServerPython.py
- CommonServerUserPython.py
- demistomock.py
- conftest.py
rule_settings:
enable:
- aug-assign
- bin-op-identity
# - break-or-continue-outside-loop (without autofix?)
- chain-compares
- collection-into-set
- collection-to-bool
- compare-via-equals
- convert-any-to-in
- convert-to-enumerate
- dataframe-append-to-concat
- de-morgan
- default-get
# - default-mutable-arg (todo: disable ruff B006)
- del-comprehension
- dict-assign-update-to-union
- dict-comprehension
# - ensure-file-closed (todo: disable ruff sim115)
- flatten-nested-try
- for-append-to-extend
- for-index-replacement
- for-index-underscore
- guard
- hoist-loop-from-if
- hoist-repeated-if-condition
- hoist-similar-statement-from-if
- hoist-statement-from-if
- hoist-statement-from-loop
- instance-method-first-arg-name
- invert-any-all
- invert-any-all-body
- last-if-guard
- lift-duplicated-conditional
- lift-return-into-if
- max-min-default
- merge-assign-and-aug-assign
- merge-comparisons
- merge-dict-assign
- merge-duplicate-blocks
# - merge-else-if-into-elif (todo: disable ruff prl501)
- merge-except-handler
- merge-list-append
- merge-list-appends-into-extend
- merge-list-extend
- merge-nested-ifs
- merge-repeated-ifs
- merge-set-add
- min-max-identity
- missing-dict-items
- move-assign
- move-assign-in-block
- non-equal-comparison
- path-read
- raise-from-previous-error
- reintroduce-else
- remove-assert-true
- remove-dict-items
- remove-none-from-default-get
- remove-pass-body
- remove-pass-elif
- remove-redundant-boolean
- remove-redundant-condition
- remove-redundant-constructor-in-dict-union
- remove-redundant-continue
# - remove-redundant-except-handler (without autofix)
# - remove-redundant-exception (without autofix)
- remove-redundant-if
- remove-redundant-pass
- remove-redundant-slice-index
- remove-str-from-fstring
- remove-str-from-print
- remove-unit-step-from-range
- remove-unnecessary-cast
- remove-unnecessary-else
# - remove-unreachable-code (without autofix)
- remove-unused-enumerate
- remove-zero-from-range
- replace-apply-with-method-call
- replace-dict-items-with-values
- replace-interpolation-with-fstring
- simplify-constant-sum
- simplify-dictionary-update
- simplify-division
- simplify-fstring-formatting
- remove-redundant-slice-index
- remove-str-from-fstring
- remove-str-from-print
- remove-unit-step-from-range
- remove-unnecessary-cast
- remove-unused-enumerate
- remove-zero-from-range
- replace-apply-with-method-call
- replace-apply-with-numpy-operation
- replace-dict-items-with-values
- set-comprehension
- simplify-boolean-comparison
- simplify-constant-sum
- simplify-dictionary-update
- simplify-generator
- simplify-len-comparison
- simplify-negative-index
- simplify-string-len-comparison
- simplify-substring-search
- skip-sorted-list-construction
- square-identity
- str-prefix-suffix
- sum-comprehension
- swap-nested-ifs
- swap-variable
# - switch (todo: remove ruff sim114)
- ternary-to-if-expression
- tuple-literal
- unwrap-iterable-construction
- use-any
- use-assigned-variable
- use-count
- use-datetime-now-not-today
- use-dict-items
- use-dictionary-union
- use-file-iterator
- use-fstring-for-concatenation
- use-fstring-for-formatting
- use-getitem-for-re-match-groups
- use-isna
- use-itertools-product
- use-join
- use-len
# - use-named-expression
- use-string-remove-affix
- while-guard-to-condition
- while-to-for
disable: []
rule_types:
- refactoring
- suggestion
- comment
python_version: "3.7"
rules: []