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