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