xref: /aosp_15_r20/system/update_engine/pylintrc (revision 5a9231315b4521097b8dc3750bc806fcafe0c72f)
1*5a923131SAndroid Build Coastguard Worker# Copyright 2016 The Android Open Source Project
2*5a923131SAndroid Build Coastguard Worker#
3*5a923131SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
4*5a923131SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
5*5a923131SAndroid Build Coastguard Worker# You may obtain a copy of the License at
6*5a923131SAndroid Build Coastguard Worker#
7*5a923131SAndroid Build Coastguard Worker#      http://www.apache.org/licenses/LICENSE-2.0
8*5a923131SAndroid Build Coastguard Worker#
9*5a923131SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*5a923131SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
11*5a923131SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*5a923131SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
13*5a923131SAndroid Build Coastguard Worker# limitations under the License.
14*5a923131SAndroid Build Coastguard Worker
15*5a923131SAndroid Build Coastguard Worker[MASTER]
16*5a923131SAndroid Build Coastguard Worker
17*5a923131SAndroid Build Coastguard Worker# Specify a configuration file.
18*5a923131SAndroid Build Coastguard Worker#rcfile=
19*5a923131SAndroid Build Coastguard Worker
20*5a923131SAndroid Build Coastguard Worker# Python code to execute, usually for sys.path manipulation such as
21*5a923131SAndroid Build Coastguard Worker# pygtk.require().
22*5a923131SAndroid Build Coastguard Worker#init-hook=
23*5a923131SAndroid Build Coastguard Worker
24*5a923131SAndroid Build Coastguard Worker# Profiled execution.
25*5a923131SAndroid Build Coastguard Workerprofile=no
26*5a923131SAndroid Build Coastguard Worker
27*5a923131SAndroid Build Coastguard Worker# Add files or directories to the ignorelist. They should be base names, not
28*5a923131SAndroid Build Coastguard Worker# paths.
29*5a923131SAndroid Build Coastguard Workerignore=CVS,.svn,.git,update_metadata_pb2.py
30*5a923131SAndroid Build Coastguard Worker
31*5a923131SAndroid Build Coastguard Worker# Pickle collected data for later comparisons.
32*5a923131SAndroid Build Coastguard Workerpersistent=yes
33*5a923131SAndroid Build Coastguard Worker
34*5a923131SAndroid Build Coastguard Worker# List of plugins (as comma separated values of python modules names) to load,
35*5a923131SAndroid Build Coastguard Worker# usually to register additional checkers.
36*5a923131SAndroid Build Coastguard Workerload-plugins=
37*5a923131SAndroid Build Coastguard Worker
38*5a923131SAndroid Build Coastguard Worker# Use multiple processes to speed up Pylint.
39*5a923131SAndroid Build Coastguard Workerjobs=1
40*5a923131SAndroid Build Coastguard Worker
41*5a923131SAndroid Build Coastguard Worker# Allow loading of arbitrary C extensions. Extensions are imported into the
42*5a923131SAndroid Build Coastguard Worker# active Python interpreter and may run arbitrary code.
43*5a923131SAndroid Build Coastguard Workerunsafe-load-any-extension=no
44*5a923131SAndroid Build Coastguard Worker
45*5a923131SAndroid Build Coastguard Worker# A comma-separated list of package or module names from where C extensions may
46*5a923131SAndroid Build Coastguard Worker# be loaded. Extensions are loading into the active Python interpreter and may
47*5a923131SAndroid Build Coastguard Worker# run arbitrary code
48*5a923131SAndroid Build Coastguard Workerextension-pkg-whitelist=
49*5a923131SAndroid Build Coastguard Worker
50*5a923131SAndroid Build Coastguard Worker# Allow optimization of some AST trees. This will activate a peephole AST
51*5a923131SAndroid Build Coastguard Worker# optimizer, which will apply various small optimizations. For instance, it can
52*5a923131SAndroid Build Coastguard Worker# be used to obtain the result of joining multiple strings with the addition
53*5a923131SAndroid Build Coastguard Worker# operator. Joining a lot of strings can lead to a maximum recursion error in
54*5a923131SAndroid Build Coastguard Worker# Pylint and this flag can prevent that. It has one side effect, the resulting
55*5a923131SAndroid Build Coastguard Worker# AST will be different than the one from reality.
56*5a923131SAndroid Build Coastguard Workeroptimize-ast=no
57*5a923131SAndroid Build Coastguard Worker
58*5a923131SAndroid Build Coastguard Worker
59*5a923131SAndroid Build Coastguard Worker[MESSAGES CONTROL]
60*5a923131SAndroid Build Coastguard Worker
61*5a923131SAndroid Build Coastguard Worker# List of checkers and warnings to enable.
62*5a923131SAndroid Build Coastguard Workerenable=old-raise-syntax
63*5a923131SAndroid Build Coastguard Worker
64*5a923131SAndroid Build Coastguard Worker# Only show warnings with the listed confidence levels. Leave empty to show
65*5a923131SAndroid Build Coastguard Worker# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
66*5a923131SAndroid Build Coastguard Workerconfidence=
67*5a923131SAndroid Build Coastguard Worker
68*5a923131SAndroid Build Coastguard Worker# Enable the message, report, category or checker with the given id(s). You can
69*5a923131SAndroid Build Coastguard Worker# either give multiple identifier separated by comma (,) or put this option
70*5a923131SAndroid Build Coastguard Worker# multiple time. See also the "--disable" option for examples.
71*5a923131SAndroid Build Coastguard Worker#enable=
72*5a923131SAndroid Build Coastguard Worker
73*5a923131SAndroid Build Coastguard Worker# Disable the message, report, category or checker with the given id(s). You
74*5a923131SAndroid Build Coastguard Worker# can either give multiple identifiers separated by comma (,) or put this
75*5a923131SAndroid Build Coastguard Worker# option multiple times (only on the command line, not in the configuration
76*5a923131SAndroid Build Coastguard Worker# file where it should appear only once).You can also use "--disable=all" to
77*5a923131SAndroid Build Coastguard Worker# disable everything first and then reenable specific checks. For example, if
78*5a923131SAndroid Build Coastguard Worker# you want to run only the similarities checker, you can use "--disable=all
79*5a923131SAndroid Build Coastguard Worker# --enable=similarities". If you want to run only the classes checker, but have
80*5a923131SAndroid Build Coastguard Worker# no Warning level messages displayed, use"--disable=all --enable=classes
81*5a923131SAndroid Build Coastguard Worker# --disable=W"
82*5a923131SAndroid Build Coastguard Worker# We leave many of the style warnings to judgement/peer review.
83*5a923131SAndroid Build Coastguard Workerdisable=
84*5a923131SAndroid Build Coastguard Worker    fixme,
85*5a923131SAndroid Build Coastguard Worker    locally-disabled,
86*5a923131SAndroid Build Coastguard Worker    locally-enabled,
87*5a923131SAndroid Build Coastguard Worker    no-self-use,
88*5a923131SAndroid Build Coastguard Worker    star-args,
89*5a923131SAndroid Build Coastguard Worker    too-few-public-methods,
90*5a923131SAndroid Build Coastguard Worker    too-many-arguments,
91*5a923131SAndroid Build Coastguard Worker    too-many-branches,
92*5a923131SAndroid Build Coastguard Worker    too-many-instance-attributes,
93*5a923131SAndroid Build Coastguard Worker    too-many-lines,
94*5a923131SAndroid Build Coastguard Worker    too-many-locals,
95*5a923131SAndroid Build Coastguard Worker    too-many-public-methods,
96*5a923131SAndroid Build Coastguard Worker    too-many-return-statements,
97*5a923131SAndroid Build Coastguard Worker    too-many-statements,
98*5a923131SAndroid Build Coastguard Worker
99*5a923131SAndroid Build Coastguard Worker
100*5a923131SAndroid Build Coastguard Worker[REPORTS]
101*5a923131SAndroid Build Coastguard Worker
102*5a923131SAndroid Build Coastguard Worker# Set the output format. Available formats are text, parseable, colorized, msvs
103*5a923131SAndroid Build Coastguard Worker# (visual studio) and html. You can also give a reporter class, eg
104*5a923131SAndroid Build Coastguard Worker# mypackage.mymodule.MyReporterClass.
105*5a923131SAndroid Build Coastguard Workeroutput-format=text
106*5a923131SAndroid Build Coastguard Worker
107*5a923131SAndroid Build Coastguard Worker# Put messages in a separate file for each module / package specified on the
108*5a923131SAndroid Build Coastguard Worker# command line instead of printing them on stdout. Reports (if any) will be
109*5a923131SAndroid Build Coastguard Worker# written in a file name "pylint_global.[txt|html]".
110*5a923131SAndroid Build Coastguard Workerfiles-output=no
111*5a923131SAndroid Build Coastguard Worker
112*5a923131SAndroid Build Coastguard Worker# Tells whether to display a full report or only the messages
113*5a923131SAndroid Build Coastguard Workerreports=no
114*5a923131SAndroid Build Coastguard Worker
115*5a923131SAndroid Build Coastguard Worker# Python expression which should return a note less than 10 (10 is the highest
116*5a923131SAndroid Build Coastguard Worker# note). You have access to the variables errors warning, statement which
117*5a923131SAndroid Build Coastguard Worker# respectively contain the number of errors / warnings messages and the total
118*5a923131SAndroid Build Coastguard Worker# number of statements analyzed. This is used by the global evaluation report
119*5a923131SAndroid Build Coastguard Worker# (RP0004).
120*5a923131SAndroid Build Coastguard Worker#evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
121*5a923131SAndroid Build Coastguard Worker
122*5a923131SAndroid Build Coastguard Worker# Template used to display messages. This is a python new-style format string
123*5a923131SAndroid Build Coastguard Worker# used to format the message information. See doc for all details
124*5a923131SAndroid Build Coastguard Worker#msg-template=
125*5a923131SAndroid Build Coastguard Worker
126*5a923131SAndroid Build Coastguard Worker
127*5a923131SAndroid Build Coastguard Worker[SIMILARITIES]
128*5a923131SAndroid Build Coastguard Worker
129*5a923131SAndroid Build Coastguard Worker# Minimum lines number of a similarity.
130*5a923131SAndroid Build Coastguard Workermin-similarity-lines=20
131*5a923131SAndroid Build Coastguard Worker
132*5a923131SAndroid Build Coastguard Worker# Ignore comments when computing similarities.
133*5a923131SAndroid Build Coastguard Workerignore-comments=yes
134*5a923131SAndroid Build Coastguard Worker
135*5a923131SAndroid Build Coastguard Worker# Ignore docstrings when computing similarities.
136*5a923131SAndroid Build Coastguard Workerignore-docstrings=yes
137*5a923131SAndroid Build Coastguard Worker
138*5a923131SAndroid Build Coastguard Worker# Ignore imports when computing similarities.
139*5a923131SAndroid Build Coastguard Workerignore-imports=no
140*5a923131SAndroid Build Coastguard Worker
141*5a923131SAndroid Build Coastguard Worker
142*5a923131SAndroid Build Coastguard Worker[TYPECHECK]
143*5a923131SAndroid Build Coastguard Worker
144*5a923131SAndroid Build Coastguard Worker# Tells whether missing members accessed in mixin class should be ignored. A
145*5a923131SAndroid Build Coastguard Worker# mixin class is detected if its name ends with "mixin" (case insensitive).
146*5a923131SAndroid Build Coastguard Workerignore-mixin-members=yes
147*5a923131SAndroid Build Coastguard Worker
148*5a923131SAndroid Build Coastguard Worker# List of module names for which member attributes should not be checked
149*5a923131SAndroid Build Coastguard Worker# (useful for modules/projects where namespaces are manipulated during runtime
150*5a923131SAndroid Build Coastguard Worker# and thus existing member attributes cannot be deduced by static analysis. It
151*5a923131SAndroid Build Coastguard Worker# supports qualified module names, as well as Unix pattern matching.
152*5a923131SAndroid Build Coastguard Workerignored-modules=update_payload.update_metadata_pb2
153*5a923131SAndroid Build Coastguard Worker
154*5a923131SAndroid Build Coastguard Worker# List of classes names for which member attributes should not be checked
155*5a923131SAndroid Build Coastguard Worker# (useful for classes with attributes dynamically set). This supports can work
156*5a923131SAndroid Build Coastguard Worker# with qualified names.
157*5a923131SAndroid Build Coastguard Workerignored-classes=hashlib,numpy
158*5a923131SAndroid Build Coastguard Worker
159*5a923131SAndroid Build Coastguard Worker# List of members which are set dynamically and missed by pylint inference
160*5a923131SAndroid Build Coastguard Worker# system, and so shouldn't trigger E1101 when accessed. Python regular
161*5a923131SAndroid Build Coastguard Worker# expressions are accepted.
162*5a923131SAndroid Build Coastguard Workergenerated-members=
163*5a923131SAndroid Build Coastguard Worker
164*5a923131SAndroid Build Coastguard Worker# List of decorators that create context managers from functions, such as
165*5a923131SAndroid Build Coastguard Worker# contextlib.contextmanager.
166*5a923131SAndroid Build Coastguard Workercontextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager
167*5a923131SAndroid Build Coastguard Worker
168*5a923131SAndroid Build Coastguard Worker
169*5a923131SAndroid Build Coastguard Worker[SPELLING]
170*5a923131SAndroid Build Coastguard Worker
171*5a923131SAndroid Build Coastguard Worker# Spelling dictionary name. Available dictionaries: none. To make it working
172*5a923131SAndroid Build Coastguard Worker# install python-enchant package.
173*5a923131SAndroid Build Coastguard Workerspelling-dict=
174*5a923131SAndroid Build Coastguard Worker
175*5a923131SAndroid Build Coastguard Worker# List of comma separated words that should not be checked.
176*5a923131SAndroid Build Coastguard Workerspelling-ignore-words=
177*5a923131SAndroid Build Coastguard Worker
178*5a923131SAndroid Build Coastguard Worker# A path to a file that contains private dictionary; one word per line.
179*5a923131SAndroid Build Coastguard Workerspelling-private-dict-file=
180*5a923131SAndroid Build Coastguard Worker
181*5a923131SAndroid Build Coastguard Worker# Tells whether to store unknown words to indicated private dictionary in
182*5a923131SAndroid Build Coastguard Worker# --spelling-private-dict-file option instead of raising a message.
183*5a923131SAndroid Build Coastguard Workerspelling-store-unknown-words=no
184*5a923131SAndroid Build Coastguard Worker
185*5a923131SAndroid Build Coastguard Worker
186*5a923131SAndroid Build Coastguard Worker[LOGGING]
187*5a923131SAndroid Build Coastguard Worker
188*5a923131SAndroid Build Coastguard Worker# Logging modules to check that the string format arguments are in logging
189*5a923131SAndroid Build Coastguard Worker# function parameter format
190*5a923131SAndroid Build Coastguard Workerlogging-modules=logging
191*5a923131SAndroid Build Coastguard Worker
192*5a923131SAndroid Build Coastguard Worker
193*5a923131SAndroid Build Coastguard Worker[VARIABLES]
194*5a923131SAndroid Build Coastguard Worker
195*5a923131SAndroid Build Coastguard Worker# Tells whether we should check for unused import in __init__ files.
196*5a923131SAndroid Build Coastguard Workerinit-import=no
197*5a923131SAndroid Build Coastguard Worker
198*5a923131SAndroid Build Coastguard Worker# A regular expression matching names used for dummy variables (i.e. not used).
199*5a923131SAndroid Build Coastguard Workerdummy-variables-rgx=^\*{0,2}(_$|unused_|dummy_)
200*5a923131SAndroid Build Coastguard Worker
201*5a923131SAndroid Build Coastguard Worker# List of additional names supposed to be defined in builtins. Remember that
202*5a923131SAndroid Build Coastguard Worker# you should avoid to define new builtins when possible.
203*5a923131SAndroid Build Coastguard Workeradditional-builtins=
204*5a923131SAndroid Build Coastguard Worker
205*5a923131SAndroid Build Coastguard Worker# List of strings which can identify a callback function by name. A callback
206*5a923131SAndroid Build Coastguard Worker# name must start or end with one of those strings.
207*5a923131SAndroid Build Coastguard Workercallbacks=cb_,_cb
208*5a923131SAndroid Build Coastguard Worker
209*5a923131SAndroid Build Coastguard Worker
210*5a923131SAndroid Build Coastguard Worker[FORMAT]
211*5a923131SAndroid Build Coastguard Worker
212*5a923131SAndroid Build Coastguard Worker# Maximum number of characters on a single line.
213*5a923131SAndroid Build Coastguard Workermax-line-length=80
214*5a923131SAndroid Build Coastguard Worker
215*5a923131SAndroid Build Coastguard Worker# Allow the body of an if to be on the same line as the test if there is no
216*5a923131SAndroid Build Coastguard Worker# else.
217*5a923131SAndroid Build Coastguard Workersingle-line-if-stmt=no
218*5a923131SAndroid Build Coastguard Worker
219*5a923131SAndroid Build Coastguard Worker# Regexp for a line that is allowed to be longer than the limit.
220*5a923131SAndroid Build Coastguard Worker# This "ignore" regex is today composed of 4 independent parts:
221*5a923131SAndroid Build Coastguard Worker# (1) Long import lines
222*5a923131SAndroid Build Coastguard Worker# (2) URLs in comments or pydocs. Detecting URLs by regex is a hard problem and
223*5a923131SAndroid Build Coastguard Worker#     no amount of tweaking will make a perfect regex AFAICT. This one is a good
224*5a923131SAndroid Build Coastguard Worker#     compromise.
225*5a923131SAndroid Build Coastguard Worker# (3) Constant string literals at the start of files don't need to be broken
226*5a923131SAndroid Build Coastguard Worker#     across lines. Allowing long paths, streamz and urls to be on a single
227*5a923131SAndroid Build Coastguard Worker#     line. Also requires that the string not be a triplequoted string.
228*5a923131SAndroid Build Coastguard Workerignore-long-lines=(?x)
229*5a923131SAndroid Build Coastguard Worker  (^\s*(import|from)\s
230*5a923131SAndroid Build Coastguard Worker   |^\s*(\#\ )?<?(https?|ftp):\/\/[^\s\/$.?#].[^\s]*>?$
231*5a923131SAndroid Build Coastguard Worker   |^[a-zA-Z_][a-zA-Z0-9_]*\s*=\s*("[^"]\S+"|'[^']\S+')
232*5a923131SAndroid Build Coastguard Worker   )
233*5a923131SAndroid Build Coastguard Worker
234*5a923131SAndroid Build Coastguard Worker# Maximum number of lines in a module
235*5a923131SAndroid Build Coastguard Workermax-module-lines=99999
236*5a923131SAndroid Build Coastguard Worker
237*5a923131SAndroid Build Coastguard Worker# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
238*5a923131SAndroid Build Coastguard Worker# tab).
239*5a923131SAndroid Build Coastguard Workerindent-string='  '
240*5a923131SAndroid Build Coastguard Worker
241*5a923131SAndroid Build Coastguard Worker# Number of spaces of indent required inside a hanging  or continued line.
242*5a923131SAndroid Build Coastguard Workerindent-after-paren=4
243*5a923131SAndroid Build Coastguard Worker
244*5a923131SAndroid Build Coastguard Worker# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
245*5a923131SAndroid Build Coastguard Workerexpected-line-ending-format=LF
246*5a923131SAndroid Build Coastguard Worker
247*5a923131SAndroid Build Coastguard Worker# Make sure : in dicts and trailing commas are checked for whitespace.
248*5a923131SAndroid Build Coastguard Workerno-space-check=
249*5a923131SAndroid Build Coastguard Worker
250*5a923131SAndroid Build Coastguard Worker
251*5a923131SAndroid Build Coastguard Worker[MISCELLANEOUS]
252*5a923131SAndroid Build Coastguard Worker
253*5a923131SAndroid Build Coastguard Worker# List of note tags to take in consideration, separated by a comma.
254*5a923131SAndroid Build Coastguard Workernotes=FIXME,XXX,TODO
255*5a923131SAndroid Build Coastguard Worker
256*5a923131SAndroid Build Coastguard Worker
257*5a923131SAndroid Build Coastguard Worker[BASIC]
258*5a923131SAndroid Build Coastguard Worker
259*5a923131SAndroid Build Coastguard Worker# Required attributes for module, separated by a comma
260*5a923131SAndroid Build Coastguard Workerrequired-attributes=
261*5a923131SAndroid Build Coastguard Worker
262*5a923131SAndroid Build Coastguard Worker# List of builtins function names that should not be used, separated by a comma
263*5a923131SAndroid Build Coastguard Workerbad-functions=map,filter,input,apply,reduce
264*5a923131SAndroid Build Coastguard Worker
265*5a923131SAndroid Build Coastguard Worker# Good variable names which should always be accepted, separated by a comma
266*5a923131SAndroid Build Coastguard Workergood-names=i,j,k,ex,x,_,main
267*5a923131SAndroid Build Coastguard Worker
268*5a923131SAndroid Build Coastguard Worker# Bad variable names which should always be refused, separated by a comma
269*5a923131SAndroid Build Coastguard Workerbad-names=foo,bar,baz,toto,tutu,tata
270*5a923131SAndroid Build Coastguard Worker
271*5a923131SAndroid Build Coastguard Worker# Colon-delimited sets of names that determine each other's naming style when
272*5a923131SAndroid Build Coastguard Worker# the name regexes allow several styles.
273*5a923131SAndroid Build Coastguard Workername-group=
274*5a923131SAndroid Build Coastguard Worker
275*5a923131SAndroid Build Coastguard Worker# Include a hint for the correct naming format with invalid-name
276*5a923131SAndroid Build Coastguard Workerinclude-naming-hint=no
277*5a923131SAndroid Build Coastguard Worker
278*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct function names.
279*5a923131SAndroid Build Coastguard Worker# 'camel_case' and 'snake_case' group names are used for consistency of naming
280*5a923131SAndroid Build Coastguard Worker# styles across functions and methods.
281*5a923131SAndroid Build Coastguard Workerfunction-rgx=^(?:(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
282*5a923131SAndroid Build Coastguard Worker
283*5a923131SAndroid Build Coastguard Worker# Naming hint for function names
284*5a923131SAndroid Build Coastguard Workerfunction-name-hint=[a-z_][a-z0-9_]{2,30}$
285*5a923131SAndroid Build Coastguard Worker
286*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct variable names
287*5a923131SAndroid Build Coastguard Workervariable-rgx=^[a-z][a-z0-9_]*$
288*5a923131SAndroid Build Coastguard Worker
289*5a923131SAndroid Build Coastguard Worker# Naming hint for variable names
290*5a923131SAndroid Build Coastguard Workervariable-name-hint=[a-z_][a-z0-9_]{2,30}$
291*5a923131SAndroid Build Coastguard Worker
292*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct module level names
293*5a923131SAndroid Build Coastguard Workerconst-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
294*5a923131SAndroid Build Coastguard Worker
295*5a923131SAndroid Build Coastguard Worker# Naming hint for constant names
296*5a923131SAndroid Build Coastguard Workerconst-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
297*5a923131SAndroid Build Coastguard Worker
298*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct instance attribute names
299*5a923131SAndroid Build Coastguard Workerattr-rgx=^_{0,2}[a-z][a-z0-9_]*$
300*5a923131SAndroid Build Coastguard Worker
301*5a923131SAndroid Build Coastguard Worker# Naming hint for attribute names
302*5a923131SAndroid Build Coastguard Workerattr-name-hint=[a-z_][a-z0-9_]{2,30}$
303*5a923131SAndroid Build Coastguard Worker
304*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct argument names
305*5a923131SAndroid Build Coastguard Workerargument-rgx=^[a-z][a-z0-9_]*$
306*5a923131SAndroid Build Coastguard Worker
307*5a923131SAndroid Build Coastguard Worker# Naming hint for argument names
308*5a923131SAndroid Build Coastguard Workerargument-name-hint=[a-z_][a-z0-9_]{2,30}$
309*5a923131SAndroid Build Coastguard Worker
310*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct class attribute
311*5a923131SAndroid Build Coastguard Workerclass-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
312*5a923131SAndroid Build Coastguard Worker
313*5a923131SAndroid Build Coastguard Worker# Naming hint for class attribute names
314*5a923131SAndroid Build Coastguard Workerclass-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
315*5a923131SAndroid Build Coastguard Worker
316*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct list comprehension /
317*5a923131SAndroid Build Coastguard Worker# generator expression variable names
318*5a923131SAndroid Build Coastguard Workerinlinevar-rgx=^[a-z][a-z0-9_]*$
319*5a923131SAndroid Build Coastguard Worker
320*5a923131SAndroid Build Coastguard Worker# Naming hint for inline iteration names
321*5a923131SAndroid Build Coastguard Workerinlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
322*5a923131SAndroid Build Coastguard Worker
323*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct class names
324*5a923131SAndroid Build Coastguard Workerclass-rgx=^_?[A-Z][a-zA-Z0-9]*$
325*5a923131SAndroid Build Coastguard Worker
326*5a923131SAndroid Build Coastguard Worker# Naming hint for class names
327*5a923131SAndroid Build Coastguard Workerclass-name-hint=[A-Z_][a-zA-Z0-9]+$
328*5a923131SAndroid Build Coastguard Worker
329*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct module names. The
330*5a923131SAndroid Build Coastguard Worker# leading underscore is sanctioned for private modules by Google's style
331*5a923131SAndroid Build Coastguard Worker# guide.
332*5a923131SAndroid Build Coastguard Workermodule-rgx=^(_?[a-z][a-z0-9_]*)|__init__$
333*5a923131SAndroid Build Coastguard Worker
334*5a923131SAndroid Build Coastguard Worker# Naming hint for module names
335*5a923131SAndroid Build Coastguard Workermodule-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
336*5a923131SAndroid Build Coastguard Worker
337*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match correct method names.
338*5a923131SAndroid Build Coastguard Worker# 'camel_case' and 'snake_case' group names are used for consistency of naming
339*5a923131SAndroid Build Coastguard Worker# styles across functions and methods. 'exempt' indicates a name which is
340*5a923131SAndroid Build Coastguard Worker# consistent with all naming styles.
341*5a923131SAndroid Build Coastguard Workermethod-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_]*))$
342*5a923131SAndroid Build Coastguard Worker
343*5a923131SAndroid Build Coastguard Worker# Naming hint for method names
344*5a923131SAndroid Build Coastguard Workermethod-name-hint=[a-z_][a-z0-9_]{2,30}$
345*5a923131SAndroid Build Coastguard Worker
346*5a923131SAndroid Build Coastguard Worker# Regular expression which should only match function or class names that do
347*5a923131SAndroid Build Coastguard Worker# not require a docstring.
348*5a923131SAndroid Build Coastguard Workerno-docstring-rgx=(__.*__|main)
349*5a923131SAndroid Build Coastguard Worker
350*5a923131SAndroid Build Coastguard Worker# Minimum line length for functions/classes that require docstrings, shorter
351*5a923131SAndroid Build Coastguard Worker# ones are exempt.
352*5a923131SAndroid Build Coastguard Workerdocstring-min-length=10
353*5a923131SAndroid Build Coastguard Worker
354*5a923131SAndroid Build Coastguard Worker# List of decorators that define properties, such as abc.abstractproperty.
355*5a923131SAndroid Build Coastguard Workerproperty-classes=abc.abstractproperty
356*5a923131SAndroid Build Coastguard Worker
357*5a923131SAndroid Build Coastguard Worker
358*5a923131SAndroid Build Coastguard Worker[ELIF]
359*5a923131SAndroid Build Coastguard Worker
360*5a923131SAndroid Build Coastguard Worker# Maximum number of nested blocks for function / method body
361*5a923131SAndroid Build Coastguard Workermax-nested-blocks=5
362*5a923131SAndroid Build Coastguard Worker
363*5a923131SAndroid Build Coastguard Worker
364*5a923131SAndroid Build Coastguard Worker[DESIGN]
365*5a923131SAndroid Build Coastguard Worker
366*5a923131SAndroid Build Coastguard Worker# Maximum number of arguments for function / method
367*5a923131SAndroid Build Coastguard Workermax-args=5
368*5a923131SAndroid Build Coastguard Worker
369*5a923131SAndroid Build Coastguard Worker# Argument names that match this expression will be ignored. Default to name
370*5a923131SAndroid Build Coastguard Worker# with leading underscore
371*5a923131SAndroid Build Coastguard Workerignored-argument-names=_.*
372*5a923131SAndroid Build Coastguard Worker
373*5a923131SAndroid Build Coastguard Worker# Maximum number of locals for function / method body
374*5a923131SAndroid Build Coastguard Workermax-locals=15
375*5a923131SAndroid Build Coastguard Worker
376*5a923131SAndroid Build Coastguard Worker# Maximum number of return / yield for function / method body
377*5a923131SAndroid Build Coastguard Workermax-returns=6
378*5a923131SAndroid Build Coastguard Worker
379*5a923131SAndroid Build Coastguard Worker# Maximum number of branch for function / method body
380*5a923131SAndroid Build Coastguard Workermax-branches=12
381*5a923131SAndroid Build Coastguard Worker
382*5a923131SAndroid Build Coastguard Worker# Maximum number of statements in function / method body
383*5a923131SAndroid Build Coastguard Workermax-statements=50
384*5a923131SAndroid Build Coastguard Worker
385*5a923131SAndroid Build Coastguard Worker# Maximum number of parents for a class (see R0901).
386*5a923131SAndroid Build Coastguard Workermax-parents=10
387*5a923131SAndroid Build Coastguard Worker
388*5a923131SAndroid Build Coastguard Worker# Maximum number of attributes for a class (see R0902).
389*5a923131SAndroid Build Coastguard Workermax-attributes=7
390*5a923131SAndroid Build Coastguard Worker
391*5a923131SAndroid Build Coastguard Worker# Minimum number of public methods for a class (see R0903).
392*5a923131SAndroid Build Coastguard Workermin-public-methods=2
393*5a923131SAndroid Build Coastguard Worker
394*5a923131SAndroid Build Coastguard Worker# Maximum number of public methods for a class (see R0904).
395*5a923131SAndroid Build Coastguard Workermax-public-methods=20
396*5a923131SAndroid Build Coastguard Worker
397*5a923131SAndroid Build Coastguard Worker# Maximum number of boolean expressions in a if statement
398*5a923131SAndroid Build Coastguard Workermax-bool-expr=5
399*5a923131SAndroid Build Coastguard Worker
400*5a923131SAndroid Build Coastguard Worker
401*5a923131SAndroid Build Coastguard Worker[CLASSES]
402*5a923131SAndroid Build Coastguard Worker
403*5a923131SAndroid Build Coastguard Worker# List of method names used to declare (i.e. assign) instance attributes.
404*5a923131SAndroid Build Coastguard Workerdefining-attr-methods=__init__,__new__,setUp
405*5a923131SAndroid Build Coastguard Worker
406*5a923131SAndroid Build Coastguard Worker# List of valid names for the first argument in a class method.
407*5a923131SAndroid Build Coastguard Workervalid-classmethod-first-arg=cls
408*5a923131SAndroid Build Coastguard Worker
409*5a923131SAndroid Build Coastguard Worker# List of valid names for the first argument in a metaclass class method.
410*5a923131SAndroid Build Coastguard Workervalid-metaclass-classmethod-first-arg=mcs
411*5a923131SAndroid Build Coastguard Worker
412*5a923131SAndroid Build Coastguard Worker# List of member names, which should be excluded from the protected access
413*5a923131SAndroid Build Coastguard Worker# warning.
414*5a923131SAndroid Build Coastguard Workerexclude-protected=_asdict,_fields,_replace,_source,_make
415*5a923131SAndroid Build Coastguard Worker
416*5a923131SAndroid Build Coastguard Worker
417*5a923131SAndroid Build Coastguard Worker[IMPORTS]
418*5a923131SAndroid Build Coastguard Worker
419*5a923131SAndroid Build Coastguard Worker# Deprecated modules which should not be used, separated by a comma
420*5a923131SAndroid Build Coastguard Workerdeprecated-modules=regsub,TERMIOS,Bastion,rexec,optparse
421*5a923131SAndroid Build Coastguard Worker
422*5a923131SAndroid Build Coastguard Worker# Create a graph of every (i.e. internal and external) dependencies in the
423*5a923131SAndroid Build Coastguard Worker# given file (report RP0402 must not be disabled)
424*5a923131SAndroid Build Coastguard Workerimport-graph=
425*5a923131SAndroid Build Coastguard Worker
426*5a923131SAndroid Build Coastguard Worker# Create a graph of external dependencies in the given file (report RP0402 must
427*5a923131SAndroid Build Coastguard Worker# not be disabled)
428*5a923131SAndroid Build Coastguard Workerext-import-graph=
429*5a923131SAndroid Build Coastguard Worker
430*5a923131SAndroid Build Coastguard Worker# Create a graph of internal dependencies in the given file (report RP0402 must
431*5a923131SAndroid Build Coastguard Worker# not be disabled)
432*5a923131SAndroid Build Coastguard Workerint-import-graph=
433*5a923131SAndroid Build Coastguard Worker
434*5a923131SAndroid Build Coastguard Worker
435*5a923131SAndroid Build Coastguard Worker[EXCEPTIONS]
436*5a923131SAndroid Build Coastguard Worker
437*5a923131SAndroid Build Coastguard Worker# Exceptions that will emit a warning when being caught. Defaults to
438*5a923131SAndroid Build Coastguard Worker# "Exception"
439*5a923131SAndroid Build Coastguard Workerovergeneral-exceptions=StandardError,Exception,BaseException
440