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