|
9 | 9 |
|
10 | 10 | # Add files or directories to the ignore list. They should be base names, not
|
11 | 11 | # paths.
|
12 |
| -ignore=compat.py |
| 12 | +ignore=compat.py, __main__.py |
13 | 13 |
|
14 | 14 | # Pickle collected data for later comparisons.
|
15 | 15 | persistent=yes
|
16 | 16 |
|
17 | 17 | # List of plugins (as comma separated values of python modules names) to load,
|
18 | 18 | # usually to register additional checkers.
|
19 | 19 | load-plugins=
|
| 20 | + pylint.extensions.check_elif, # Else If Used checker |
| 21 | + pylint.extensions.emptystring, # compare to empty string |
| 22 | + pylint.extensions.comparetozero, # compare to 0 |
| 23 | + pylint.extensions.docparams, # Parameter documentation checker |
20 | 24 |
|
21 | 25 | # Use multiple processes to speed up Pylint.
|
| 26 | +# Pylint has a bug on multitread, turn it off. |
22 | 27 | jobs=1
|
23 | 28 |
|
24 | 29 | # Allow loading of arbitrary C extensions. Extensions are imported into the
|
@@ -59,7 +64,103 @@ confidence=
|
59 | 64 | # --enable=similarities". If you want to run only the classes checker, but have
|
60 | 65 | # no Warning level messages displayed, use"--disable=all --enable=classes
|
61 | 66 | # --disable=W"
|
62 |
| -disable=R0201,W0613,I0021,I0020,W1618,W1619,R0902,R0903,W0231,W0611,R0913,W0703,C0330,R0204,I0011,R0904 |
| 67 | +disable= |
| 68 | + W0613, # Unused argument %r |
| 69 | + W0640, # Cell variable %s defined in loop A variable used in a closure is defined in a loop |
| 70 | + R0902, # Too many instance attributes (%s/%s) |
| 71 | + R0903, # Too few public methods (%s/%s) |
| 72 | + R0913, # Too many arguments (%s/%s) |
| 73 | + W0703, # Catching too general exception %s |
| 74 | + R0904, # Too many public methods (%s/%s) |
| 75 | + R0914, # Too many local variables (%s/%s) |
| 76 | + R0915, # Too many statements |
| 77 | + C0415, # Import outside toplevel (%s) Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file. |
| 78 | + C0115, # missing-class-docstring |
| 79 | + # below are docstring lint rules, in order to incrementally improve our docstring while |
| 80 | + # without introduce too much effort at a time, we exclude most of the docstring lint rules. |
| 81 | + # We will remove them one by one. |
| 82 | + # W9005, # "%s" has constructor parameters documented in class and __init__ |
| 83 | + W9006, # "%s" not documented as being raised |
| 84 | + # W9008, # Redundant returns documentation |
| 85 | + # W9010, # Redundant yields documentation |
| 86 | + W9011, # Missing return documentation |
| 87 | + W9012, # Missing return type documentation |
| 88 | + # W9013, # Missing yield documentation |
| 89 | + # W9014, # Missing yield type documentation |
| 90 | + # W9015, # "%s" missing in parameter documentation |
| 91 | + W9016, # "%s" missing in parameter type documentation |
| 92 | + # W9017, # "%s" differing in parameter documentation |
| 93 | + # W9018, # "%s" differing in parameter type documentation |
| 94 | + # W9019, # "%s" useless ignored parameter documentation |
| 95 | + # W9020, # "%s" useless ignored parameter type documentation |
| 96 | + # Constant name style warnings. We will remove them one by one. |
| 97 | + C0103, # Class constant name "%s" doesn't conform to UPPER_CASE naming style ('([^\\W\\da-z][^\\Wa-z]*|__.*__)$' pattern) (invalid-name) |
| 98 | + # New recommendations, disable for now to avoid introducing behaviour changes. |
| 99 | + R1729, # Use a generator instead '%s' (use-a-generator) |
| 100 | + R1732, # Consider using 'with' for resource-allocating operations (consider-using-with) |
| 101 | + # This applies to CPython only. |
| 102 | + I1101, # Module 'math' has no 'pow' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) |
| 103 | + # Added to allow linting. Need to work on removing over time |
| 104 | + R0801, # dupilcated code |
| 105 | + R0401, # Cyclic import |
| 106 | + C0411, # import ordering |
| 107 | + W9015, # missing parameter in doc strings |
| 108 | + W0612, # unused variable |
| 109 | + R0205, # useless-object-inheritanc |
| 110 | + C0301, # line to long |
| 111 | + R0201, # no self use, method could be a function |
| 112 | + C0114, # missing-module-docstring |
| 113 | + W1202, # Use lazy % formatting in logging functions (logging-format-interpolation) |
| 114 | + E1101, # No member |
| 115 | + W0622, # Redefining built-in 'property' (redefined-builtin) |
| 116 | + W0611, # unused imports |
| 117 | + W0231, # super not called |
| 118 | + W0212, # protected-access |
| 119 | + W0201, # attribute-defined-outside-init |
| 120 | + R1725, # Consider using Python 3 style super() without arguments (super-with-arguments) |
| 121 | + C2001, # Avoid comparisons to zero (compare-to-zero) |
| 122 | + R0912, # too many branches |
| 123 | + W0235, # Useless super delegation in method '__init__' (useless-super-delegation) |
| 124 | + C0412, # Imports from package samtranslator are not grouped (ungrouped-imports) |
| 125 | + W0223, # abstract-method |
| 126 | + W0107, # unnecessary-pass |
| 127 | + W0707, # raise-missing-from |
| 128 | + R1720, # no-else-raise |
| 129 | + W0621, # redefined-outer-name |
| 130 | + E0203, # access-member-before-definition |
| 131 | + W0221, # arguments-differ |
| 132 | + R1710, # inconsistent-return-statements |
| 133 | + R1702, # too-many-nested-blocks |
| 134 | + C0123, # Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) |
| 135 | + W0105, # String statement has no effect (pointless-string-statement) |
| 136 | + C0206, # Consider iterating with .items() (consider-using-dict-items) |
| 137 | + W9008, # Redundant returns documentation (redundant-returns-doc) |
| 138 | + E0602, # undefined-variable |
| 139 | + C0112, # empty-docstring |
| 140 | + C0116, # missing-function-docstring |
| 141 | + C0200, # consider-using-enumerate |
| 142 | + R5501, # Consider using "elif" instead of "else if" (else-if-used) |
| 143 | + W9017, # differing-param-doc |
| 144 | + W9018, # differing-type-doc |
| 145 | + W0511, # fixme |
| 146 | + C0325, # superfluous-parens |
| 147 | + R1701, # consider-merging-isinstance |
| 148 | + C0302, # too-many-lines |
| 149 | + C0303, # trailing-whitespace |
| 150 | + R1721, # unnecessary-comprehension |
| 151 | + C0121, # singleton-comparison |
| 152 | + E1305, # too-many-format-args |
| 153 | + R1724, # no-else-continue |
| 154 | + E0611, # no-name-in-module |
| 155 | + W9013, # missing-yield-doc |
| 156 | + W9014, # missing-yield-type-doc |
| 157 | + C0201, # consider-iterating-dictionary |
| 158 | + W0237, # arguments-renamed |
| 159 | + R1718, # consider-using-set-comprehension |
| 160 | + R1723, # no-else-break |
| 161 | + E1133, # not-an-iterable |
| 162 | + E1135, # unsupported-membership-test |
| 163 | + R1705, # no-else-return |
63 | 164 |
|
64 | 165 |
|
65 | 166 | [REPORTS]
|
@@ -162,18 +263,20 @@ module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
162 | 263 | module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
163 | 264 |
|
164 | 265 | # Regular expression matching correct method names
|
165 |
| -method-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 266 | +method-rgx=[a-z_][a-z0-9_]{2,50}$ |
166 | 267 |
|
167 | 268 | # Naming hint for method names
|
168 | 269 | method-name-hint=[a-z_][a-z0-9_]{2,30}$
|
169 | 270 |
|
170 | 271 | # Regular expression which should only match function or class names that do
|
171 | 272 | # not require a docstring.
|
172 |
| -no-docstring-rgx=.* |
| 273 | +no-docstring-rgx=^_ |
173 | 274 |
|
174 | 275 | # Minimum line length for functions/classes that require docstrings, shorter
|
175 | 276 | # ones are exempt.
|
176 |
| -docstring-min-length=-1 |
| 277 | +# To improve our docstring without spending too much effort at a time, |
| 278 | +# here set it to 30 and decrease it gradually in the future. |
| 279 | +docstring-min-length=30 |
177 | 280 |
|
178 | 281 |
|
179 | 282 | [FORMAT]
|
@@ -221,16 +324,16 @@ notes=FIXME,XXX
|
221 | 324 | [SIMILARITIES]
|
222 | 325 |
|
223 | 326 | # Minimum lines number of a similarity.
|
224 |
| -min-similarity-lines=5 |
| 327 | +min-similarity-lines=12 |
225 | 328 |
|
226 | 329 | # Ignore comments when computing similarities.
|
227 |
| -ignore-comments=no |
| 330 | +ignore-comments=yes |
228 | 331 |
|
229 | 332 | # Ignore docstrings when computing similarities.
|
230 |
| -ignore-docstrings=no |
| 333 | +ignore-docstrings=yes |
231 | 334 |
|
232 | 335 | # Ignore imports when computing similarities.
|
233 |
| -ignore-imports=no |
| 336 | +ignore-imports=yes |
234 | 337 |
|
235 | 338 |
|
236 | 339 | [SPELLING]
|
@@ -259,7 +362,7 @@ ignore-mixin-members=yes
|
259 | 362 | # List of module names for which member attributes should not be checked
|
260 | 363 | # (useful for modules/projects where namespaces are manipulated during runtime
|
261 | 364 | # and thus existing member attributes cannot be deduced by static analysis
|
262 |
| -ignored-modules=six.moves |
| 365 | +ignored-modules= |
263 | 366 |
|
264 | 367 | # List of classes names for which member attributes should not be checked
|
265 | 368 | # (useful for classes with attributes dynamically set).
|
@@ -315,7 +418,7 @@ max-args=5
|
315 | 418 | ignored-argument-names=_.*
|
316 | 419 |
|
317 | 420 | # Maximum number of locals for function / method body
|
318 |
| -max-locals=15 |
| 421 | +max-locals=17 |
319 | 422 |
|
320 | 423 | # Maximum number of return / yield for function / method body
|
321 | 424 | max-returns=6
|
|
0 commit comments