blob: df550a2de4ec80ef00fdc32d8a6c5e5653eb8016 [file] [log] [blame]
Kshitij Sisodiaf9efe0d2022-09-30 16:42:50 +01001# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
2# SPDX-License-Identifier: Apache-2.0
3[MASTER]
4
5# A comma-separated list of package or module names from where C extensions may
6# be loaded. Extensions are loading into the active Python interpreter and may
7# run arbitrary code
8extension-pkg-whitelist=
9
10# Add files or directories to the blacklist. They should be base names, not
11# paths.
12ignore=CVS,generated,_generated
13
14# Add files or directories matching the regex patterns to the blacklist. The
15# regex matches against base names, not paths.
16ignore-patterns=_version.py
17
18# Python code to execute, usually for sys.path manipulation such as
19# pygtk.require().
20#init-hook=
21
22# Use multiple processes to speed up Pylint.
23jobs=1
24
25# List of plugins (as comma separated values of python modules names) to load,
26# usually to register additional checkers.
27load-plugins=
28
29# Pickle collected data for later comparisons.
30persistent=yes
31
32# Specify a configuration file.
33#rcfile=
34
35# Allow loading of arbitrary C extensions. Extensions are imported into the
36# active Python interpreter and may run arbitrary code.
37unsafe-load-any-extension=no
38
39
40[MESSAGES CONTROL]
41
42# Only show warnings with the listed confidence levels. Leave empty to show
43# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
44confidence=
45
46# Disable the message, report, category or checker with the given id(s). You
47# can either give multiple identifiers separated by comma (,) or put this
48# option multiple times (only on the command line, not in the configuration
49# file where it should appear only once).You can also use "--disable=all" to
50# disable everything first and then reenable specific checks. For example, if
51# you want to run only the similarities checker, you can use "--disable=all
52# --enable=similarities". If you want to run only the classes checker, but have
53# no Warning level messages displayed, use"--disable=all --enable=classes
54# --disable=W"
55disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
56
57# Enable the message, report, category or checker with the given id(s). You can
58# either give multiple identifier separated by comma (,) or put this option
59# multiple time (only on the command line, not in the configuration file where
60# it should appear only once). See also the "--disable" option for examples.
61enable=
62
63
64[REPORTS]
65
66# Python expression which should return a note less than 10 (10 is the highest
67# note). You have access to the variables errors warning, statement which
68# respectively contain the number of errors / warnings messages and the total
69# number of statements analyzed. This is used by the global evaluation report
70# (RP0004).
71evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
72
73# Template used to display messages. This is a python new-style format string
74# used to format the message information. See doc for all details
75#msg-template=
76
77# Set the output format. Available formats are text, parseable, colorized, json
78# and msvs (visual studio).You can also give a reporter class, eg
79# mypackage.mymodule.MyReporterClass.
80output-format=colorized
81
82# Tells whether to display a full report or only the messages
83reports=yes
84
85# Activate the evaluation score.
86score=yes
87
88
89[REFACTORING]
90
91# Maximum number of nested blocks for function / method body
92max-nested-blocks=5
93
94
95[BASIC]
96
97# Naming hint for argument names
98argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
99
100# Regular expression matching correct argument names
101argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
102
103# Naming hint for attribute names
104attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
105
106# Regular expression matching correct attribute names
107attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
108
109# Bad variable names which should always be refused, separated by a comma
110bad-names=foo,bar,baz,toto,tutu,tata
111
112# Naming hint for class attribute names
113class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
114
115# Regular expression matching correct class attribute names
116class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
117
118# Naming hint for class names
119class-name-hint=[A-Z_][a-zA-Z0-9]+$
120
121# Regular expression matching correct class names
122class-rgx=[A-Z_][a-zA-Z0-9]+$
123
124# Naming hint for constant names
125const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
126
127# Regular expression matching correct constant names
128const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
129
130# Minimum line length for functions/classes that require docstrings, shorter
131# ones are exempt.
132docstring-min-length=-1
133
134# Naming hint for function names
135function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
136
137# Regular expression matching correct function names
138function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
139
140# Good variable names which should always be accepted, separated by a comma
141good-names=i,j,k,ex,Run,_
142
143# Include a hint for the correct naming format with invalid-name
144include-naming-hint=no
145
146# Naming hint for inline iteration names
147inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
148
149# Regular expression matching correct inline iteration names
150inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
151
152# Naming hint for method names
153method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
154
155# Regular expression matching correct method names
156method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
157
158# Naming hint for module names
159module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
160
161# Regular expression matching correct module names
162module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
163
164# Colon-delimited sets of names that determine each other's naming style when
165# the name regexes allow several styles.
166name-group=
167
168# Regular expression which should only match function or class names that do
169# not require a docstring.
170no-docstring-rgx=^_
171
172# List of decorators that produce properties, such as abc.abstractproperty. Add
173# to this list to register other decorators that produce valid properties.
174property-classes=abc.abstractproperty
175
176# Naming hint for variable names
177variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
178
179# Regular expression matching correct variable names
180variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
181
182
183[SPELLING]
184
185# Spelling dictionary name. Available dictionaries: none. To make it working
186# install python-enchant package.
187spelling-dict=
188
189# List of comma separated words that should not be checked.
190spelling-ignore-words=
191
192# A path to a file that contains private dictionary; one word per line.
193spelling-private-dict-file=
194
195# Tells whether to store unknown words to indicated private dictionary in
196# --spelling-private-dict-file option instead of raising a message.
197spelling-store-unknown-words=no
198
199
200[SIMILARITIES]
201
202# Ignore comments when computing similarities.
203ignore-comments=yes
204
205# Ignore docstrings when computing similarities.
206ignore-docstrings=yes
207
208# Ignore imports when computing similarities.
209ignore-imports=no
210
211# Minimum lines number of a similarity.
212min-similarity-lines=4
213
214
215[FORMAT]
216
217# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
218expected-line-ending-format=
219
220# Regexp for a line that is allowed to be longer than the limit.
221ignore-long-lines=^\s*(# )?<?https?://\S+>?$
222
223# Number of spaces of indent required inside a hanging or continued line.
224indent-after-paren=4
225
226# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
227# tab).
228indent-string=' '
229
230# Maximum number of characters on a single line.
231max-line-length=120
232
233# Maximum number of lines in a module
234max-module-lines=1000
235
236# List of optional constructs for which whitespace checking is disabled. `dict-
237# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
238# `trailing-comma` allows a space between comma and closing bracket: (a, ).
239# `empty-line` allows space-only lines.
240no-space-check=trailing-comma,dict-separator
241
242# Allow the body of a class to be on the same line as the declaration if body
243# contains single statement.
244single-line-class-stmt=no
245
246# Allow the body of an if to be on the same line as the test if there is no
247# else.
248single-line-if-stmt=no
249
250
251[LOGGING]
252
253# Logging modules to check that the string format arguments are in logging
254# function parameter format
255logging-modules=logging
256
257
258[TYPECHECK]
259
260# List of decorators that produce context managers, such as
261# contextlib.contextmanager. Add to this list to register other decorators that
262# produce valid context managers.
263contextmanager-decorators=contextlib.contextmanager
264
265# List of members which are set dynamically and missed by pylint inference
266# system, and so shouldn't trigger E1101 when accessed. Python regular
267# expressions are accepted.
268generated-members=
269
270# Tells whether missing members accessed in mixin class should be ignored. A
271# mixin class is detected if its name ends with "mixin" (case insensitive).
272ignore-mixin-members=yes
273
274# This flag controls whether pylint should warn about no-member and similar
275# checks whenever an opaque object is returned when inferring. The inference
276# can return multiple potential results while evaluating a Python object, but
277# some branches might not be evaluated, which results in partial inference. In
278# that case, it might be useful to still emit no-member and other checks for
279# the rest of the inferred objects.
280ignore-on-opaque-inference=yes
281
282# List of class names for which member attributes should not be checked (useful
283# for classes with dynamically set attributes). This supports the use of
284# qualified names.
285ignored-classes=optparse.Values,thread._local,_thread._local
286
287# List of module names for which member attributes should not be checked
288# (useful for modules/projects where namespaces are manipulated during runtime
289# and thus existing member attributes cannot be deduced by static analysis. It
290# supports qualified module names, as well as Unix pattern matching.
291ignored-modules=
292
293# Show a hint with possible names when a member name was not found. The aspect
294# of finding the hint is based on edit distance.
295missing-member-hint=yes
296
297# The minimum edit distance a name should have in order to be considered a
298# similar match for a missing member name.
299missing-member-hint-distance=1
300
301# The total number of similar names that should be taken in consideration when
302# showing a hint for a missing member.
303missing-member-max-choices=1
304
305
306[VARIABLES]
307
308# List of additional names supposed to be defined in builtins. Remember that
309# you should avoid to define new builtins when possible.
310additional-builtins=
311
312# Tells whether unused global variables should be treated as a violation.
313allow-global-unused-variables=yes
314
315# List of strings which can identify a callback function by name. A callback
316# name must start or end with one of those strings.
317callbacks=cb_,_cb
318
319# A regular expression matching the name of dummy variables (i.e. expectedly
320# not used).
321dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
322
323# Argument names that match this expression will be ignored. Default to name
324# with leading underscore
325ignored-argument-names=_.*|^ignored_|^unused_
326
327# Tells whether we should check for unused import in __init__ files.
328init-import=no
329
330# List of qualified module names which can have objects that can redefine
331# builtins.
332redefining-builtins-modules=six.moves,future.builtins
333
334
335[MISCELLANEOUS]
336
337# List of note tags to take in consideration, separated by a comma.
338notes=FIXME,XXX,TODO
339
340
341[IMPORTS]
342
343# Allow wildcard imports from modules that define __all__.
344allow-wildcard-with-all=no
345
346# Analyse import fallback blocks. This can be used to support both Python 2 and
347# 3 compatible code, which means that the block might have code that exists
348# only in one or another interpreter, leading to false positives when analysed.
349analyse-fallback-blocks=no
350
351# Deprecated modules which should not be used, separated by a comma
352deprecated-modules=optparse,tkinter.tix
353
354# Create a graph of external dependencies in the given file (report RP0402 must
355# not be disabled)
356ext-import-graph=
357
358# Create a graph of every (i.e. internal and external) dependencies in the
359# given file (report RP0402 must not be disabled)
360import-graph=
361
362# Create a graph of internal dependencies in the given file (report RP0402 must
363# not be disabled)
364int-import-graph=
365
366# Force import order to recognize a module as part of the standard
367# compatibility libraries.
368known-standard-library=
369
370# Force import order to recognize a module as part of a third party library.
371known-third-party=enchant
372
373
374[CLASSES]
375
376# List of method names used to declare (i.e. assign) instance attributes.
377defining-attr-methods=__init__,__new__,setUp
378
379# List of member names, which should be excluded from the protected access
380# warning.
381exclude-protected=_asdict,_fields,_replace,_source,_make
382
383# List of valid names for the first argument in a class method.
384valid-classmethod-first-arg=cls
385
386# List of valid names for the first argument in a metaclass class method.
387valid-metaclass-classmethod-first-arg=mcs
388
389
390[DESIGN]
391
392# Maximum number of arguments for function / method
393max-args=5
394
395# Maximum number of attributes for a class (see R0902).
396max-attributes=7
397
398# Maximum number of boolean expressions in a if statement
399max-bool-expr=5
400
401# Maximum number of branch for function / method body
402max-branches=12
403
404# Maximum number of locals for function / method body
405max-locals=15
406
407# Maximum number of parents for a class (see R0901).
408max-parents=7
409
410# Maximum number of public methods for a class (see R0904).
411max-public-methods=20
412
413# Maximum number of return / yield for function / method body
414max-returns=6
415
416# Maximum number of statements in function / method body
417max-statements=50
418
419# Minimum number of public methods for a class (see R0903).
420min-public-methods=2
421
422
423[EXCEPTIONS]
424
425# Exceptions that will emit a warning when being caught. Defaults to
426# "Exception"
427overgeneral-exceptions=Exception