maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 1 | [MASTER] |
| 2 | |
| 3 | # Specify a configuration file. |
| 4 | #rcfile= |
| 5 | |
| 6 | # Python code to execute, usually for sys.path manipulation such as |
| 7 | # pygtk.require(). |
| 8 | #init-hook= |
| 9 | |
Ayu Ishii | 0985861 | 2020-06-26 18:00:52 +0000 | [diff] [blame] | 10 | # Add files or directories to the blocklist. They should be base names, not |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 11 | # paths. |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 12 | ignore=CVS |
| 13 | |
| 14 | # Pickle collected data for later comparisons. |
| 15 | persistent=yes |
| 16 | |
| 17 | # List of plugins (as comma separated values of python modules names) to load, |
| 18 | # usually to register additional checkers. |
| 19 | load-plugins= |
Mike Frysinger | 198b562 | 2019-12-09 23:25:20 +0000 | [diff] [blame] | 20 | pylint_quotes |
| 21 | |
| 22 | |
| 23 | # Configure quote preferences. |
| 24 | string-quote = single-avoid-escape |
| 25 | triple-quote = double |
| 26 | docstring-quote = double |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 27 | |
| 28 | |
| 29 | [MESSAGES CONTROL] |
| 30 | |
| 31 | # Enable the message, report, category or checker with the given id(s). You can |
| 32 | # either give multiple identifier separated by comma (,) or put this option |
| 33 | # multiple time. |
| 34 | #enable= |
| 35 | |
| 36 | # Disable the message, report, category or checker with the given id(s). You |
| 37 | # can either give multiple identifier separated by comma (,) or put this option |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 38 | # multiple time (only on the command line, not in the configuration file where |
| 39 | # it should appear only once). |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 40 | # |
| 41 | # These should get enabled, but the codebase has too many violations currently: |
| 42 | # bad-continuation |
| 43 | # anomalous-backslash-in-string |
| 44 | # bad-context-manager |
| 45 | # bad-indentation |
| 46 | # bad-str-strip-call |
| 47 | # bad-whitespace |
| 48 | # cell-var-from-loop |
| 49 | # deprecated-lambda |
| 50 | # eval-used |
| 51 | # function-redefined |
| 52 | # import-error |
| 53 | # locally-enabled |
| 54 | # missing-final-newline |
| 55 | # no-init |
| 56 | # no-name-in-module |
| 57 | # no-self-use |
| 58 | # not-callable |
| 59 | # old-style-class |
| 60 | # protected-access |
| 61 | # superfluous-parens |
| 62 | # super-on-old-class |
| 63 | # too-many-function-args |
| 64 | # trailing-whitespace |
| 65 | # unnecessary-semicolon |
| 66 | # unpacking-non-sequence |
| 67 | # unused-import |
| 68 | # useless-else-on-loop |
| 69 | # |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 70 | # CHANGED: |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 71 | disable= |
| 72 | invalid-name, |
| 73 | missing-docstring, |
| 74 | too-many-lines, |
| 75 | bad-inline-option, |
| 76 | locally-disabled, |
| 77 | duplicate-code, |
| 78 | too-many-ancestors, |
| 79 | too-many-instance-attributes, |
| 80 | too-few-public-methods, |
| 81 | too-many-public-methods, |
| 82 | too-many-return-statements, |
| 83 | too-many-branches, |
| 84 | too-many-arguments, |
| 85 | too-many-locals, |
| 86 | too-many-statements, |
| 87 | abstract-class-not-used, |
| 88 | abstract-class-little-used, |
| 89 | exec-used, |
| 90 | bad-builtin, |
| 91 | star-args, |
| 92 | deprecated-module, |
| 93 | reimported, |
| 94 | fixme, |
| 95 | global-statement, |
| 96 | broad-except, |
| 97 | logging-not-lazy, |
| 98 | bad-continuation, |
| 99 | anomalous-backslash-in-string, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 100 | assigning-non-slot, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 101 | bad-context-manager, |
| 102 | bad-indentation, |
| 103 | bad-str-strip-call, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 104 | bad-super-call, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 105 | bad-whitespace, |
| 106 | cell-var-from-loop, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 107 | consider-using-enumerate, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 108 | deprecated-lambda, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 109 | deprecated-method, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 110 | eval-used, |
| 111 | function-redefined, |
| 112 | import-error, |
Mike Frysinger | 198b562 | 2019-12-09 23:25:20 +0000 | [diff] [blame] | 113 | invalid-docstring-quote, |
| 114 | invalid-string-quote, |
| 115 | invalid-triple-quote, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 116 | locally-enabled, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 117 | misplaced-comparison-constant, |
| 118 | misplaced-bare-raise, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 119 | missing-final-newline, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 120 | multiple-imports, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 121 | no-init, |
| 122 | no-name-in-module, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 123 | no-self-argument, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 124 | no-self-use, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 125 | not-an-iterable, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 126 | not-callable, |
| 127 | old-style-class, |
| 128 | protected-access, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 129 | redefined-variable-type, |
| 130 | simplifiable-if-statement, |
| 131 | singleton-comparison, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 132 | superfluous-parens, |
| 133 | super-on-old-class, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 134 | too-many-boolean-expressions, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 135 | too-many-function-args, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 136 | too-many-nested-blocks, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 137 | trailing-whitespace, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 138 | undefined-variable, |
| 139 | ungrouped-imports, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 140 | unnecessary-semicolon, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 141 | unneeded-not, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 142 | unpacking-non-sequence, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 143 | unsubscriptable-object, |
| 144 | unsupported-membership-test, |
Quinten Yearsley | b2cc4a9 | 2016-12-15 13:53:26 -0800 | [diff] [blame] | 145 | unused-import, |
Mike Frysinger | 862370c | 2018-07-20 20:02:39 +0000 | [diff] [blame] | 146 | useless-else-on-loop, |
| 147 | using-constant-test, |
| 148 | wrong-import-order, |
| 149 | wrong-import-position, |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 150 | |
| 151 | |
| 152 | [REPORTS] |
| 153 | |
| 154 | # Set the output format. Available formats are text, parseable, colorized, msvs |
| 155 | # (visual studio) and html |
| 156 | output-format=text |
| 157 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 158 | # Put messages in a separate file for each module / package specified on the |
| 159 | # command line instead of printing them on stdout. Reports (if any) will be |
| 160 | # written in a file name "pylint_global.[txt|html]". |
| 161 | files-output=no |
| 162 | |
| 163 | # Tells whether to display a full report or only the messages |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 164 | # CHANGED: |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 165 | reports=no |
| 166 | |
Mike Frysinger | ed485e1 | 2019-08-25 23:05:55 +0000 | [diff] [blame] | 167 | # Activate the evaluation score. |
| 168 | score=no |
| 169 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 170 | # Python expression which should return a note less than 10 (10 is the highest |
| 171 | # note). You have access to the variables errors warning, statement which |
| 172 | # respectively contain the number of errors / warnings messages and the total |
| 173 | # number of statements analyzed. This is used by the global evaluation report |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 174 | # (RP0004). |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 175 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) |
| 176 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 177 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 178 | [VARIABLES] |
| 179 | |
| 180 | # Tells whether we should check for unused import in __init__ files. |
| 181 | init-import=no |
| 182 | |
| 183 | # A regular expression matching the beginning of the name of dummy variables |
| 184 | # (i.e. not used). |
| 185 | dummy-variables-rgx=_|dummy |
| 186 | |
| 187 | # List of additional names supposed to be defined in builtins. Remember that |
| 188 | # you should avoid to define new builtins when possible. |
| 189 | additional-builtins= |
| 190 | |
| 191 | |
| 192 | [TYPECHECK] |
| 193 | |
| 194 | # Tells whether missing members accessed in mixin class should be ignored. A |
| 195 | # mixin class is detected if its name ends with "mixin" (case insensitive). |
| 196 | ignore-mixin-members=yes |
| 197 | |
| 198 | # List of classes names for which member attributes should not be checked |
| 199 | # (useful for classes with attributes dynamically set). |
maruel@chromium.org | 90d6388 | 2012-04-24 17:52:04 +0000 | [diff] [blame] | 200 | ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 201 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 202 | # List of members which are set dynamically and missed by pylint inference |
| 203 | # system, and so shouldn't trigger E0201 when accessed. Python regular |
| 204 | # expressions are accepted. |
iannucci@chromium.org | 6f84803 | 2012-12-06 17:30:25 +0000 | [diff] [blame] | 205 | generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 206 | |
| 207 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 208 | [MISCELLANEOUS] |
| 209 | |
| 210 | # List of note tags to take in consideration, separated by a comma. |
| 211 | notes=FIXME,XXX,TODO |
| 212 | |
| 213 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 214 | [SIMILARITIES] |
| 215 | |
| 216 | # Minimum lines number of a similarity. |
| 217 | min-similarity-lines=4 |
| 218 | |
| 219 | # Ignore comments when computing similarities. |
| 220 | ignore-comments=yes |
| 221 | |
| 222 | # Ignore docstrings when computing similarities. |
| 223 | ignore-docstrings=yes |
| 224 | |
| 225 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 226 | [FORMAT] |
| 227 | |
| 228 | # Maximum number of characters on a single line. |
| 229 | max-line-length=80 |
| 230 | |
| 231 | # Maximum number of lines in a module |
| 232 | max-module-lines=1000 |
| 233 | |
| 234 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 |
| 235 | # tab). |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 236 | # CHANGED: |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 237 | indent-string=' ' |
| 238 | |
| 239 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 240 | [BASIC] |
| 241 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 242 | # List of builtins function names that should not be used, separated by a comma |
| 243 | bad-functions=map,filter,apply,input |
| 244 | |
| 245 | # Regular expression which should only match correct module names |
| 246 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
| 247 | |
| 248 | # Regular expression which should only match correct module level names |
| 249 | const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ |
| 250 | |
| 251 | # Regular expression which should only match correct class names |
| 252 | class-rgx=[A-Z_][a-zA-Z0-9]+$ |
| 253 | |
| 254 | # Regular expression which should only match correct function names |
| 255 | function-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 256 | |
| 257 | # Regular expression which should only match correct method names |
| 258 | method-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 259 | |
| 260 | # Regular expression which should only match correct instance attribute names |
| 261 | attr-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 262 | |
| 263 | # Regular expression which should only match correct argument names |
| 264 | argument-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 265 | |
| 266 | # Regular expression which should only match correct variable names |
| 267 | variable-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 268 | |
| 269 | # Regular expression which should only match correct list comprehension / |
| 270 | # generator expression variable names |
| 271 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
| 272 | |
| 273 | # Good variable names which should always be accepted, separated by a comma |
| 274 | good-names=i,j,k,ex,Run,_ |
| 275 | |
| 276 | # Bad variable names which should always be refused, separated by a comma |
| 277 | bad-names=foo,bar,baz,toto,tutu,tata |
| 278 | |
| 279 | # Regular expression which should only match functions or classes name which do |
| 280 | # not require a docstring |
| 281 | no-docstring-rgx=__.*__ |
| 282 | |
| 283 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 284 | [DESIGN] |
| 285 | |
| 286 | # Maximum number of arguments for function / method |
| 287 | max-args=5 |
| 288 | |
| 289 | # Argument names that match this expression will be ignored. Default to name |
| 290 | # with leading underscore |
| 291 | ignored-argument-names=_.* |
| 292 | |
| 293 | # Maximum number of locals for function / method body |
| 294 | max-locals=15 |
| 295 | |
| 296 | # Maximum number of return / yield for function / method body |
| 297 | max-returns=6 |
| 298 | |
| 299 | # Maximum number of branch for function / method body |
| 300 | max-branchs=12 |
| 301 | |
| 302 | # Maximum number of statements in function / method body |
| 303 | max-statements=50 |
| 304 | |
| 305 | # Maximum number of parents for a class (see R0901). |
| 306 | max-parents=7 |
| 307 | |
| 308 | # Maximum number of attributes for a class (see R0902). |
| 309 | max-attributes=7 |
| 310 | |
| 311 | # Minimum number of public methods for a class (see R0903). |
| 312 | min-public-methods=2 |
| 313 | |
| 314 | # Maximum number of public methods for a class (see R0904). |
| 315 | max-public-methods=20 |
| 316 | |
| 317 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 318 | [CLASSES] |
| 319 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 320 | # List of method names used to declare (i.e. assign) instance attributes. |
| 321 | defining-attr-methods=__init__,__new__,setUp |
| 322 | |
| 323 | # List of valid names for the first argument in a class method. |
| 324 | valid-classmethod-first-arg=cls |
| 325 | |
| 326 | |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 327 | [IMPORTS] |
| 328 | |
| 329 | # Deprecated modules which should not be used, separated by a comma |
| 330 | deprecated-modules=regsub,string,TERMIOS,Bastion,rexec |
| 331 | |
| 332 | # Create a graph of every (i.e. internal and external) dependencies in the |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 333 | # given file (report RP0402 must not be disabled) |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 334 | import-graph= |
| 335 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 336 | # Create a graph of external dependencies in the given file (report RP0402 must |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 337 | # not be disabled) |
| 338 | ext-import-graph= |
| 339 | |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 340 | # Create a graph of internal dependencies in the given file (report RP0402 must |
maruel@chromium.org | 6e29d57 | 2010-06-04 17:32:20 +0000 | [diff] [blame] | 341 | # not be disabled) |
| 342 | int-import-graph= |
maruel@chromium.org | ff9a217 | 2012-04-24 16:55:32 +0000 | [diff] [blame] | 343 | |
| 344 | |
| 345 | [EXCEPTIONS] |
| 346 | |
| 347 | # Exceptions that will emit a warning when being caught. Defaults to |
| 348 | # "Exception" |
| 349 | overgeneral-exceptions=Exception |