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