1 [MESSAGES CONTROL] 2 3 # Only show warnings with the listed confidence levels. Leave empty to show 4 # all. 5 confidence= 6 7 # Disable the message, report, category or checker with the given id(s). You 8 # can either give multiple identifiers separated by comma (,) or put this 9 # option multiple times (only on the command line, not in the configuration 10 # file where it should appear only once).You can also use "--disable=all" to 11 # disable everything first and then reenable specific checks. For example, if 12 # you want to run only the similarities checker, you can use "--disable=all 13 # --enable=similarities". If you want to run only the classes checker, but have 14 # no Warning level messages displayed, use"--disable=all --enable=classes 15 # --disable=W" 16 disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression, F0401, C6304, C0111 17 # F0401 ignores import errors since gpylint does not have the python paths 18 # C6304 ignore Copyright line errors. 19 # C0111 ignore Docstring at top of file. 20 21 # Enable the message, report, category or checker with the given id(s). You can 22 # either give multiple identifier separated by comma (,) or put this option 23 # multiple time. See also the "--disable" option for examples. 24 #enable= 25 26 27 [MODES] 28 29 # DEPRECATED. 30 disable-docstring=no 31 32 # DEPRECATED, use --mode=base 33 google=no 34 35 # The configuration modes to activate (default: base). 36 mode=base 37 38 # The mode to use when import path setup fails (default: style). 39 safe-mode=base 40 41 # DEPRECATED, use --mode=style 42 single-file=no 43 44 # DEPRECATED, use --mode=test 45 test=no 46 47 # A pattern for file names that should activate test mode. 48 test-filename-pattern=_(unit|reg)?test\.py$ 49 50 # The configuration mode to use for tests (default: test). 51 test-mode=test 52 53 54 [PATHS] 55 56 # Directories to add to sys.path. 57 #import-paths= 58 59 # Inject some known modules. 60 inject-known-modules=no 61 62 # The import path resolver 63 resolver=blaze 64 65 66 [REPORTS] 67 68 # Add a comment according to your evaluation note. This is used by the global 69 # evaluation report (RP0004). 70 comment=no 71 72 # Python expression which should return a note less than 10 (10 is the highest 73 # note). You have access to the variables errors warning, statement which 74 # respectively contain the number of errors / warnings messages and the total 75 # number of statements analyzed. This is used by the global evaluation report 76 # (RP0004). 77 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 78 79 # Put messages in a separate file for each module / package specified on the 80 # command line instead of printing them on stdout. Reports (if any) will be 81 # written in a file name "pylint_global.[txt|html]". 82 files-output=no 83 84 # String to print as the module footer. 85 #module-footer-template= 86 87 # Template for the module header. %(filename)s will be replaced with the name 88 # of the file under analysis. 89 #module-header-template= 90 91 # Template used to display messages. This is a python new-style format string 92 # used to format the message information. See doc for all details 93 #msg-template= 94 95 # Set the output format. Available formats are text, parseable, colorized, msvs 96 # (visual studio) and html. You can also give a reporter class, eg 97 # mypackage.mymodule.MyReporterClass. 98 output-format=sorted-text 99 100 # Tells whether to display a full report or only the messages 101 reports=no 102 103 104 [BASIC] 105 106 # Regular expression which should only match correct argument names 107 argument-rgx=^[a-z][a-z0-9_]*$ 108 109 # Regular expression which should only match correct instance attribute names 110 attr-rgx=^_{0,2}[a-z][a-z0-9_]*$ 111 112 # List of builtins function names that should not be used, separated by a comma 113 bad-functions=input,apply,reduce 114 115 # Bad variable names which should always be refused, separated by a comma 116 bad-names= 117 118 # Regular expression which should only match correct attribute names in class 119 # bodies 120 class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ 121 122 # Regular expression which should only match correct class names 123 class-rgx=^_?[A-Z][a-zA-Z0-9]*$ 124 125 # Regular expression which should only match correct module level names 126 const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ 127 128 # Minimum line length for functions/classes that require docstrings, shorter 129 # ones are exempt. 130 docstring-min-length=10 131 132 # Regular expression which should only match correct function names 133 # function-rgx=^(?:(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$ 134 function-rgx=^(?:(?P<snake_case>_?[a-z][a-z0-9_]*))$ 135 136 # Good variable names which should always be accepted, separated by a comma 137 good-names=main,_ 138 139 # Regular expression which should only match correct list comprehension / 140 # generator expression variable names 141 inlinevar-rgx=^[a-z][a-z0-9_]*$ 142 143 # Regular expression which should only match correct method names 144 # method-rgx=^(?:(?P<exempt>__[a-z0-9_]+__|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$ 145 method-rgx=^(?:(?P<exempt>__[a-z0-9_]+__|next)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$ 146 147 # Regular expression which should only match correct module names 148 module-rgx=^(_?[a-z][a-z0-9_]*)|__init__|PRESUBMIT|PRESUBMIT_unittest$ 149 150 # Colon delimited types of objects which should have the same naming style, 151 # separated by a comma 152 name-group=function:method 153 154 # Regular expression which should only match function or class names that do 155 # not require a docstring. 156 no-docstring-rgx=(__.*__|main) 157 158 # Required attributes for module, separated by a comma 159 required-attributes= 160 161 # Regular expression which should only match correct variable names 162 variable-rgx=^[a-z][a-z0-9_]*$ 163 164 165 [CLASSES] 166 167 # List of method names used to declare (i.e. assign) instance attributes. 168 defining-attr-methods=__init__,__new__,setUp 169 170 # List of interface methods to ignore, separated by a comma. This is used for 171 # instance to not check methods defines in Zope's Interface base class. 172 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by 173 174 # List of valid names for the first argument in a class method. 175 valid-classmethod-first-arg=cls,class_ 176 177 # List of valid names for the first argument in a metaclass class method. 178 valid-metaclass-classmethod-first-arg=mcs 179 180 181 [DESIGN] 182 183 # Argument names that match this expression will be ignored. Default to name 184 # with leading underscore 185 ignored-argument-names=_.* 186 187 # Maximum number of arguments for function / method 188 max-args=5 189 190 # Maximum number of attributes for a class (see R0902). 191 max-attributes=7 192 193 # Maximum number of branch for function / method body 194 max-branches=12 195 196 # Maximum number of locals for function / method body 197 max-locals=15 198 199 # Maximum number of parents for a class (see R0901). 200 max-parents=7 201 202 # Maximum number of public methods for a class (see R0904). 203 max-public-methods=20 204 205 # Maximum number of return / yield for function / method body 206 max-returns=6 207 208 # Maximum number of statements in function / method body 209 max-statements=50 210 211 # Minimum number of public methods for a class (see R0903). 212 min-public-methods=2 213 214 215 [EXCEPTIONS] 216 217 # Exceptions that will emit a warning when being caught. Defaults to 218 # "Exception" 219 overgeneral-exceptions=StandardError,Exception 220 221 222 [FORMAT] 223 224 # Regexp for a line that is allowed to be longer than the limit. 225 ignore-long-lines=(^\s*(import|from)\s|^__version__\s=\s['"]\$Id:|^\s*(# )?<?https?://\S+>?$) 226 227 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 228 # tab). 229 indent-string=' ' 230 231 # Maximum number of characters on a single line. 232 max-line-length=80 233 234 # Maximum number of lines in a module 235 max-module-lines=99999 236 237 # List of optional constructs for which whitespace checking is disabled 238 no-space-check= 239 240 # Allow the body of an if to be on the same line as the test if there is no 241 # else. 242 single-line-if-stmt=yes 243 244 245 [GOOGLE AST] 246 247 # List of module members that should be marked as deprecated. 248 deprecated-members=string.atof,string.atoi,string.atol,string.capitalize,string.expandtabs,string.find,string.rfind,string.index,string.rindex,string.count,string.lower,string.split,string.rsplit,string.splitfields,string.join,string.joinfields,string.lstrip,string.rstrip,string.strip,string.swapcase,string.translate,string.upper,string.ljust,string.rjust,string.center,string.zfill,string.replace,sys.exitfunc 249 250 # Maximum line length for lambdas. 251 short-func-length=1 252 253 254 [GOOGLE DOCSTRING] 255 256 # List of exceptions that do not need to be mentioned in the Raises section of 257 # a docstring. 258 ignore-exceptions=NotImplementedError,StopIteration 259 260 261 [GOOGLE IMPORTS] 262 263 # List of modules that should be ignored if unused. 264 ignore-unused-imports=google3 265 266 267 [GOOGLE LINES] 268 269 # Regexp for a proper copyright notice. 270 copyright=Copyright \d{4} Google Inc\. +All Rights Reserved\. 271 272 273 [GOOGLE TOKENS] 274 275 # A regex for finding comments that do not have a space between leading comment 276 # separators and textual content. 277 comment-starts-without-space=\A#[^\s\w]*\w 278 279 # Regexp for a proper TODO comment; the uid group, if any, should match the 280 # user ID of the relevant person 281 good-todo=# ?TODO\((?P<uid>[a-z][a-z0-9-]*)|b/(?P<bugid>[0-9]+)\):? 282 283 # Number of spaces of indent required when the last token on the preceding line 284 # is an open (, [, or {. 285 indent-after-paren=8 286 287 # Minimum number of spaces between the end of a line and an inline comment. 288 min-comment-space=2 289 290 # Regexp for a TODO comment, which may be incorrect. 291 todo=(?i)#\s*todo 292 293 294 [IMPORTS] 295 296 # Deprecated modules which should not be used, separated by a comma 297 deprecated-modules=regsub,TERMIOS,Bastion,rexec 298 299 # Create a graph of external dependencies in the given file (report RP0402 must 300 # not be disabled) 301 ext-import-graph= 302 303 # Create a graph of every (i.e. internal and external) dependencies in the 304 # given file (report RP0402 must not be disabled) 305 import-graph= 306 307 # Create a graph of internal dependencies in the given file (report RP0402 must 308 # not be disabled) 309 int-import-graph= 310 311 312 [LOGGING] 313 314 # Logging modules to check that the string format arguments are in logging 315 # function parameter format 316 logging-modules=logging,google3.pyglib.logging 317 318 319 [MASTER] 320 321 # Add files or directories to the blacklist. They should be base names, not 322 # paths. 323 ignore=CVS 324 325 # Arbitrary Python code to execute before linting. 326 #init-hook= 327 328 # List of plugins (as comma separated values of python modules names) to load, 329 # usually to register additional checkers. 330 load-plugins= 331 332 # Pickle collected data for later comparisons. 333 persistent=no 334 335 # Use a custom configuration file for linting. 336 #rcfile= 337 338 339 [MISCELLANEOUS] 340 341 # List of note tags to take in consideration, separated by a comma. 342 notes= 343 344 345 [SIMILARITIES] 346 347 # Ignore comments when computing similarities. 348 ignore-comments=yes 349 350 # Ignore docstrings when computing similarities. 351 ignore-docstrings=yes 352 353 # Ignore imports when computing similarities. 354 ignore-imports=no 355 356 # Minimum lines number of a similarity. 357 min-similarity-lines=4 358 359 360 [TYPECHECK] 361 362 # List of members which are set dynamically and missed by pylint inference 363 # system, and so shouldn't trigger E0201 when accessed. Python regular 364 # expressions are accepted. 365 generated-members=REQUEST,acl_users,aq_parent 366 367 # Tells whether missing members accessed in mixin class should be ignored. A 368 # mixin class is detected if its name ends with "mixin" (case insensitive). 369 ignore-mixin-members=yes 370 371 # List of classes names for which member attributes should not be checked 372 # (useful for classes with attributes dynamically set). 373 ignored-classes=SQLObject 374 375 # When zope mode is activated, add a predefined set of Zope acquired attributes 376 # to generated-members. 377 zope=no 378 379 380 [VARIABLES] 381 382 # List of additional names supposed to be defined in builtins. Remember that 383 # you should avoid to define new builtins when possible. 384 additional-builtins= 385 386 # A regular expression matching the beginning of the name of dummy variables 387 # (i.e. not used). 388 dummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_) 389 390 # Tells whether we should check for unused import in __init__ files. 391 init-import=no 392