blob: 692bd03c7ba9d91ab17ec36eb047af306148fb2a [file] [log] [blame]
Olivia Nordquist8016e722016-03-24 10:36:14 -08001[MASTER]
2
3# Specify a configuration file.
Samuel Marks9d4fbd32020-12-22 09:17:25 +11004#rcfile=
Olivia Nordquist8016e722016-03-24 10:36:14 -08005
6# Python code to execute, usually for sys.path manipulation such as
7# pygtk.require().
8#init-hook=
9
10# Profiled execution.
11profile=no
12
Karmel Allison18ebe822020-07-20 15:49:15 -070013# Add files or directories to the denylist. They should be base names, not
Olivia Nordquist8016e722016-03-24 10:36:14 -080014# paths.
15ignore=CVS
16
17# Pickle collected data for later comparisons.
18persistent=yes
19
20# List of plugins (as comma separated values of python modules names) to load,
21# usually to register additional checkers.
Samuel Marks4d3d4e32020-12-06 09:27:30 +110022load-plugins=pylint.extensions.docparams
Samuel Marksb70f04e2020-12-16 20:53:19 +110023accept-no-param-doc=no
Olivia Nordquist8016e722016-03-24 10:36:14 -080024
25[MESSAGES CONTROL]
26
Olivia Nordquist8016e722016-03-24 10:36:14 -080027# Disable the message, report, category or checker with the given id(s). You
28# can either give multiple identifiers separated by comma (,) or put this
29# option multiple times (only on the command line, not in the configuration
30# file where it should appear only once).You can also use "--disable=all" to
31# disable everything first and then reenable specific checks. For example, if
32# you want to run only the similarities checker, you can use "--disable=all
33# --enable=similarities". If you want to run only the classes checker, but have
34# no Warning level messages displayed, use"--disable=all --enable=classes
35# --disable=W"
Ian Hua6b511122021-08-11 21:38:50 +010036disable=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,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,not-context-manager,invalid-sequence-index,W,R,C,I
Olivia Nordquist8016e722016-03-24 10:36:14 -080037
Ian Hua6b511122021-08-11 21:38:50 +010038# Enable the message, report, category or checker with the given id(s). You can
39# either give multiple identifier separated by comma (,) or put this option
40# multiple time. See also the "--disable" option for examples.
41# W0311 bad-indentation
42# W0312 mixed-indentation
43# C0330 bad-continuation
44# C0301 line-too-long
45# C0326 bad-whitespace
46# W0611 unused-import
47# W0622 redefined-builtin
48enable=indexing-exception,old-raise-syntax,W0311,W0312,C0330,C0301,C0326,W0611,W0622
Olivia Nordquist8016e722016-03-24 10:36:14 -080049
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -080050# Set the cache size for astng objects.
51cache-size=500
52
Olivia Nordquist8016e722016-03-24 10:36:14 -080053
54[REPORTS]
55
56# Set the output format. Available formats are text, parseable, colorized, msvs
57# (visual studio) and html. You can also give a reporter class, eg
58# mypackage.mymodule.MyReporterClass.
59output-format=text
60
61# Put messages in a separate file for each module / package specified on the
62# command line instead of printing them on stdout. Reports (if any) will be
63# written in a file name "pylint_global.[txt|html]".
64files-output=no
65
66# Tells whether to display a full report or only the messages
67reports=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# Add a comment according to your evaluation note. This is used by the global
77# evaluation report (RP0004).
78comment=no
79
80# Template used to display messages. This is a python new-style format string
81# used to format the message information. See doc for all details
82#msg-template=
83
84
85[TYPECHECK]
86
87# Tells whether missing members accessed in mixin class should be ignored. A
88# mixin class is detected if its name ends with "mixin" (case insensitive).
89ignore-mixin-members=yes
90
91# List of classes names for which member attributes should not be checked
92# (useful for classes with attributes dynamically set).
93ignored-classes=SQLObject
94
95# When zope mode is activated, add a predefined set of Zope acquired attributes
96# to generated-members.
97zope=no
98
99# List of members which are set dynamically and missed by pylint inference
100# system, and so shouldn't trigger E0201 when accessed. Python regular
101# expressions are accepted.
102generated-members=REQUEST,acl_users,aq_parent
103
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -0800104# List of decorators that create context managers from functions, such as
105# contextlib.contextmanager.
106contextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager
107
Olivia Nordquist8016e722016-03-24 10:36:14 -0800108
109[VARIABLES]
110
111# Tells whether we should check for unused import in __init__ files.
112init-import=no
113
114# A regular expression matching the beginning of the name of dummy variables
115# (i.e. not used).
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -0800116dummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_)
Olivia Nordquist8016e722016-03-24 10:36:14 -0800117
118# List of additional names supposed to be defined in builtins. Remember that
119# you should avoid to define new builtins when possible.
120additional-builtins=
121
122
123[BASIC]
124
125# Required attributes for module, separated by a comma
126required-attributes=
127
128# List of builtins function names that should not be used, separated by a comma
129bad-functions=apply,input,reduce
130
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -0800131
132# Disable the report(s) with the given id(s).
133# All non-Google reports are disabled by default.
134disable-report=R0001,R0002,R0003,R0004,R0101,R0102,R0201,R0202,R0220,R0401,R0402,R0701,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,R0923
135
Olivia Nordquist8016e722016-03-24 10:36:14 -0800136# Regular expression which should only match correct module names
137module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
138
139# Regular expression which should only match correct module level names
140const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
141
142# Regular expression which should only match correct class names
143class-rgx=^_?[A-Z][a-zA-Z0-9]*$
144
145# Regular expression which should only match correct function names
146function-rgx=^(?:(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
147
148# Regular expression which should only match correct method names
149method-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_]*))$
150
151# Regular expression which should only match correct instance attribute names
152attr-rgx=^_{0,2}[a-z][a-z0-9_]*$
153
154# Regular expression which should only match correct argument names
155argument-rgx=^[a-z][a-z0-9_]*$
156
157# Regular expression which should only match correct variable names
158variable-rgx=^[a-z][a-z0-9_]*$
159
160# Regular expression which should only match correct attribute names in class
161# bodies
162class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
163
164# Regular expression which should only match correct list comprehension /
165# generator expression variable names
166inlinevar-rgx=^[a-z][a-z0-9_]*$
167
168# Good variable names which should always be accepted, separated by a comma
169good-names=main,_
170
171# Bad variable names which should always be refused, separated by a comma
172bad-names=
173
174# Regular expression which should only match function or class names that do
175# not require a docstring.
176no-docstring-rgx=(__.*__|main)
177
178# Minimum line length for functions/classes that require docstrings, shorter
179# ones are exempt.
180docstring-min-length=10
181
182
183[FORMAT]
184
185# Maximum number of characters on a single line.
186max-line-length=80
187
188# Regexp for a line that is allowed to be longer than the limit.
Yifei Fengaee7f952018-01-26 16:53:59 -0800189ignore-long-lines=(?x)
190 (^\s*(import|from)\s
191 |\$Id:\s\/\/depot\/.+#\d+\s\$
192 |^[a-zA-Z_][a-zA-Z0-9_]*\s*=\s*("[^"]\S+"|'[^']\S+')
193 |^\s*\#\ LINT\.ThenChange
194 |^[^#]*\#\ type:\ [a-zA-Z_][a-zA-Z0-9_.,[\] ]*$
195 |pylint
196 |"""
197 |\#
198 |lambda
199 |(https?|ftp):)
Olivia Nordquist8016e722016-03-24 10:36:14 -0800200
201# Allow the body of an if to be on the same line as the test if there is no
202# else.
203single-line-if-stmt=y
204
205# List of optional constructs for which whitespace checking is disabled
206no-space-check=
207
208# Maximum number of lines in a module
209max-module-lines=99999
210
211# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
212# tab).
213indent-string=' '
214
215
216[SIMILARITIES]
217
218# Minimum lines number of a similarity.
219min-similarity-lines=4
220
221# Ignore comments when computing similarities.
222ignore-comments=yes
223
224# Ignore docstrings when computing similarities.
225ignore-docstrings=yes
226
227# Ignore imports when computing similarities.
228ignore-imports=no
229
230
231[MISCELLANEOUS]
232
233# List of note tags to take in consideration, separated by a comma.
234notes=
235
236
237[IMPORTS]
238
239# Deprecated modules which should not be used, separated by a comma
240deprecated-modules=regsub,TERMIOS,Bastion,rexec,sets
241
242# Create a graph of every (i.e. internal and external) dependencies in the
243# given file (report RP0402 must not be disabled)
244import-graph=
245
246# Create a graph of external dependencies in the given file (report RP0402 must
247# not be disabled)
248ext-import-graph=
249
250# Create a graph of internal dependencies in the given file (report RP0402 must
251# not be disabled)
252int-import-graph=
253
254
255[CLASSES]
256
257# List of interface methods to ignore, separated by a comma. This is used for
258# instance to not check methods defines in Zope's Interface base class.
259ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
260
261# List of method names used to declare (i.e. assign) instance attributes.
262defining-attr-methods=__init__,__new__,setUp
263
264# List of valid names for the first argument in a class method.
265valid-classmethod-first-arg=cls,class_
266
267# List of valid names for the first argument in a metaclass class method.
268valid-metaclass-classmethod-first-arg=mcs
269
270
271[DESIGN]
272
273# Maximum number of arguments for function / method
274max-args=5
275
276# Argument names that match this expression will be ignored. Default to name
277# with leading underscore
278ignored-argument-names=_.*
279
280# Maximum number of locals for function / method body
281max-locals=15
282
283# Maximum number of return / yield for function / method body
284max-returns=6
285
286# Maximum number of branch for function / method body
287max-branches=12
288
289# Maximum number of statements in function / method body
290max-statements=50
291
292# Maximum number of parents for a class (see R0901).
293max-parents=7
294
295# Maximum number of attributes for a class (see R0902).
296max-attributes=7
297
298# Minimum number of public methods for a class (see R0903).
299min-public-methods=2
300
301# Maximum number of public methods for a class (see R0904).
302max-public-methods=20
303
304
305[EXCEPTIONS]
306
307# Exceptions that will emit a warning when being caught. Defaults to
308# "Exception"
309overgeneral-exceptions=Exception,StandardError,BaseException
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -0800310
311
312[AST]
313
314# Maximum line length for lambdas
315short-func-length=1
316
317# List of module members that should be marked as deprecated.
318# All of the string functions are listed in 4.1.4 Deprecated string functions
319# in the Python 2.4 docs.
320deprecated-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
321
322
323[DOCSTRING]
324
Samuel Marks4d3d4e32020-12-06 09:27:30 +1100325default-docstring-type=google
A. Unique TensorFlower81d9a242017-01-03 12:33:21 -0800326# List of exceptions that do not need to be mentioned in the Raises section of
327# a docstring.
328ignore-exceptions=AssertionError,NotImplementedError,StopIteration,TypeError
329
330
331
332[TOKENS]
333
334# Number of spaces of indent required when the last token on the preceding line
335# is an open (, [, or {.
336indent-after-paren=4
337
338
339[GOOGLE LINES]
340
341# Regexp for a proper copyright notice.
Charles Nicholson0ac2d9b2017-04-10 09:29:49 -0800342copyright=Copyright \d{4} The TensorFlow Authors\. +All [Rr]ights [Rr]eserved\.