FreeCAD

Форк
0
/
.pylintrc 
614 строк · 19.8 Кб
1
[MAIN]
2

3
# Analyse import fallback blocks. This can be used to support both Python 2 and
4
# 3 compatible code, which means that the block might have code that exists
5
# only in one or another interpreter, leading to false positives when analysed.
6
analyse-fallback-blocks=yes
7

8
# Load and enable all available extensions. Use --list-extensions to see a list
9
# all available extensions.
10
#enable-all-extensions=
11

12
# In error mode, messages with a category besides ERROR or FATAL are
13
# suppressed, and no reports are done by default. Error mode is compatible with
14
# disabling specific errors.
15
#errors-only=
16

17
# Always return a 0 (non-error) status code, even if lint errors are found.
18
# This is primarily useful in continuous integration scripts.
19
#exit-zero=
20

21
# A comma-separated list of package or module names from where C extensions may
22
# be loaded. Extensions are loading into the active Python interpreter and may
23
# run arbitrary code.
24
extension-pkg-allow-list=
25

26
# A comma-separated list of package or module names from where C extensions may
27
# be loaded. Extensions are loading into the active Python interpreter and may
28
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
29
# for backward compatibility.)
30
extension-pkg-whitelist=
31

32
# Return non-zero exit code if any of these messages/categories are detected,
33
# even if score is above --fail-under value. Syntax same as enable. Messages
34
# specified are enabled, while categories only check already-enabled messages.
35
fail-on=
36

37
# Specify a score threshold to be exceeded before program exits with error.
38
fail-under=10
39

40
# Interpret the stdin as a python script, whose filename needs to be passed as
41
# the module_or_package argument.
42
#from-stdin=
43

44
# Files or directories to be skipped. They should be base names, not paths.
45
ignore=CVS
46

47
# Add files or directories matching the regex patterns to the ignore-list. The
48
# regex matches against paths and can be in Posix or Windows format.
49
ignore-paths=
50

51
# Files or directories matching the regex patterns are skipped. The regex
52
# matches against base names, not paths. The default value ignores Emacs file
53
# locks
54
ignore-patterns=^\.#
55

56
# List of module names for which member attributes should not be checked
57
# (useful for modules/projects where namespaces are manipulated during runtime
58
# and thus existing member attributes cannot be deduced by static analysis). It
59
# supports qualified module names, as well as Unix pattern matching.
60
ignored-modules=FreeCAD,FreeCADGui
61

62
# Python code to execute, usually for sys.path manipulation such as
63
# pygtk.require().
64
#init-hook=
65

66
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
67
# number of processors available to use, and will cap the count on Windows to
68
# avoid hangs.
69
jobs=1
70

71
# Control the amount of potential inferred values when inferring a single
72
# object. This can help the performance when dealing with large functions or
73
# complex, nested conditions.
74
limit-inference-results=100
75

76
# List of plugins (as comma separated values of python module names) to load,
77
# usually to register additional checkers.
78
load-plugins=
79

80
# Pickle collected data for later comparisons.
81
persistent=yes
82

83
# Minimum Python version to use for version dependent checks. Will default to
84
# the version used to run pylint.
85
py-version=3.8
86

87
# Discover python modules and packages in the file system subtree.
88
recursive=no
89

90
# When enabled, pylint would attempt to guess common misconfiguration and emit
91
# user-friendly hints instead of false-positive error messages.
92
suggestion-mode=yes
93

94
# Allow loading of arbitrary C extensions. Extensions are imported into the
95
# active Python interpreter and may run arbitrary code.
96
unsafe-load-any-extension=no
97

98
# In verbose mode, extra non-checker-related info will be displayed.
99
#verbose=
100

101

102
[REPORTS]
103

104
# Python expression which should return a score less than or equal to 10. You
105
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
106
# 'convention', and 'info' which contain the number of messages in each
107
# category, as well as 'statement' which is the total number of statements
108
# analyzed. This score is used by the global evaluation report (RP0004).
109
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
110

111
# Template used to display messages. This is a python new-style format string
112
# used to format the message information. See doc for all details.
113
msg-template=
114

115
# Set the output format. Available formats are text, parseable, colorized, json
116
# and msvs (visual studio). You can also give a reporter class, e.g.
117
# mypackage.mymodule.MyReporterClass.
118
#output-format=
119

120
# Tells whether to display a full report or only the messages.
121
reports=yes
122

123
# Activate the evaluation score.
124
score=yes
125

126

127
[MESSAGES CONTROL]
128

129
# Only show warnings with the listed confidence levels. Leave empty to show
130
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
131
# UNDEFINED.
132
confidence=HIGH,
133
           CONTROL_FLOW,
134
           INFERENCE,
135
           INFERENCE_FAILURE,
136
           UNDEFINED
137

138
# Disable the message, report, category or checker with the given id(s). You
139
# can either give multiple identifiers separated by comma (,) or put this
140
# option multiple times (only on the command line, not in the configuration
141
# file where it should appear only once). You can also use "--disable=all" to
142
# disable everything first and then re-enable specific checks. For example, if
143
# you want to run only the similarities checker, you can use "--disable=all
144
# --enable=similarities". If you want to run only the classes checker, but have
145
# no Warning level messages displayed, use "--disable=all --enable=classes
146
# --disable=W".
147
disable=raw-checker-failed,
148
        bad-inline-option,
149
        locally-disabled,
150
        file-ignored,
151
        suppressed-message,
152
        useless-suppression,
153
        deprecated-pragma,
154
        use-symbolic-message-instead,
155
        invalid-name,
156
        wrong-import-order,
157
        import-error,
158
        undefined-variable
159

160
# Enable the message, report, category or checker with the given id(s). You can
161
# either give multiple identifier separated by comma (,) or put this option
162
# multiple time (only on the command line, not in the configuration file where
163
# it should appear only once). See also the "--disable" option for examples.
164
enable=c-extension-no-member
165

166

167
[BASIC]
168

169
# Naming style matching correct argument names.
170
argument-naming-style=snake_case
171

172
# Regular expression matching correct argument names. Overrides argument-
173
# naming-style. If left empty, argument names will be checked with the set
174
# naming style.
175
#argument-rgx=
176

177
# Naming style matching correct attribute names.
178
attr-naming-style=snake_case
179

180
# Regular expression matching correct attribute names. Overrides attr-naming-
181
# style. If left empty, attribute names will be checked with the set naming
182
# style.
183
#attr-rgx=
184

185
# Bad variable names which should always be refused, separated by a comma.
186
bad-names=foo,
187
          bar,
188
          baz,
189
          toto,
190
          tutu,
191
          tata
192

193
# Bad variable names regexes, separated by a comma. If names match any regex,
194
# they will always be refused
195
bad-names-rgxs=
196

197
# Naming style matching correct class attribute names.
198
class-attribute-naming-style=any
199

200
# Regular expression matching correct class attribute names. Overrides class-
201
# attribute-naming-style. If left empty, class attribute names will be checked
202
# with the set naming style.
203
#class-attribute-rgx=
204

205
# Naming style matching correct class constant names.
206
class-const-naming-style=UPPER_CASE
207

208
# Regular expression matching correct class constant names. Overrides class-
209
# const-naming-style. If left empty, class constant names will be checked with
210
# the set naming style.
211
#class-const-rgx=
212

213
# Naming style matching correct class names.
214
class-naming-style=PascalCase
215

216
# Regular expression matching correct class names. Overrides class-naming-
217
# style. If left empty, class names will be checked with the set naming style.
218
#class-rgx=
219

220
# Naming style matching correct constant names.
221
const-naming-style=UPPER_CASE
222

223
# Regular expression matching correct constant names. Overrides const-naming-
224
# style. If left empty, constant names will be checked with the set naming
225
# style.
226
#const-rgx=
227

228
# Minimum line length for functions/classes that require docstrings, shorter
229
# ones are exempt.
230
docstring-min-length=4
231

232
# Naming style matching correct function names.
233
function-naming-style=snake_case
234

235
# Regular expression matching correct function names. Overrides function-
236
# naming-style. If left empty, function names will be checked with the set
237
# naming style.
238
#function-rgx=
239

240
# Good variable names which should always be accepted, separated by a comma.
241
good-names=i,
242
           j,
243
           k,
244
           ex,
245
           Run,
246
           _
247

248
# Good variable names regexes, separated by a comma. If names match any regex,
249
# they will always be accepted
250
good-names-rgxs=
251

252
# Include a hint for the correct naming format with invalid-name.
253
include-naming-hint=no
254

255
# Naming style matching correct inline iteration names.
256
inlinevar-naming-style=any
257

258
# Regular expression matching correct inline iteration names. Overrides
259
# inlinevar-naming-style. If left empty, inline iteration names will be checked
260
# with the set naming style.
261
#inlinevar-rgx=
262

263
# Naming style matching correct method names.
264
method-naming-style=snake_case
265

266
# Regular expression matching correct method names. Overrides method-naming-
267
# style. If left empty, method names will be checked with the set naming style.
268
#method-rgx=
269

270
# Naming style matching correct module names.
271
module-naming-style=snake_case
272

273
# Regular expression matching correct module names. Overrides module-naming-
274
# style. If left empty, module names will be checked with the set naming style.
275
#module-rgx=
276

277
# Colon-delimited sets of names that determine each other's naming style when
278
# the name regexes allow several styles.
279
name-group=
280

281
# Regular expression which should only match function or class names that do
282
# not require a docstring.
283
no-docstring-rgx=^_
284

285
# List of decorators that produce properties, such as abc.abstractproperty. Add
286
# to this list to register other decorators that produce valid properties.
287
# These decorators are taken in consideration only for invalid-name.
288
property-classes=abc.abstractproperty
289

290
# Regular expression matching correct type variable names. If left empty, type
291
# variable names will be checked with the set naming style.
292
#typevar-rgx=
293

294
# Naming style matching correct variable names.
295
variable-naming-style=snake_case
296

297
# Regular expression matching correct variable names. Overrides variable-
298
# naming-style. If left empty, variable names will be checked with the set
299
# naming style.
300
#variable-rgx=
301

302

303
[CLASSES]
304

305
# Warn about protected attribute access inside special methods
306
check-protected-access-in-special-methods=no
307

308
# List of method names used to declare (i.e. assign) instance attributes.
309
defining-attr-methods=__init__,
310
                      __new__,
311
                      setUp,
312
                      __post_init__
313

314
# List of member names, which should be excluded from the protected access
315
# warning.
316
exclude-protected=_asdict,
317
                  _fields,
318
                  _replace,
319
                  _source,
320
                  _make
321

322
# List of valid names for the first argument in a class method.
323
valid-classmethod-first-arg=cls
324

325
# List of valid names for the first argument in a metaclass class method.
326
valid-metaclass-classmethod-first-arg=cls
327

328

329
[REFACTORING]
330

331
# Maximum number of nested blocks for function / method body
332
max-nested-blocks=5
333

334
# Complete name of functions that never returns. When checking for
335
# inconsistent-return-statements if a never returning function is called then
336
# it will be considered as an explicit return statement and no message will be
337
# printed.
338
never-returning-functions=sys.exit,argparse.parse_error
339

340

341
[DESIGN]
342

343
# List of regular expressions of class ancestor names to ignore when counting
344
# public methods (see R0903)
345
exclude-too-few-public-methods=
346

347
# List of qualified class names to ignore when counting class parents (see
348
# R0901)
349
ignored-parents=
350

351
# Maximum number of arguments for function / method.
352
max-args=5
353

354
# Maximum number of attributes for a class (see R0902).
355
max-attributes=15
356

357
# Maximum number of boolean expressions in an if statement (see R0916).
358
max-bool-expr=5
359

360
# Maximum number of branch for function / method body.
361
max-branches=12
362

363
# Maximum number of locals for function / method body.
364
max-locals=15
365

366
# Maximum number of parents for a class (see R0901).
367
max-parents=7
368

369
# Maximum number of public methods for a class (see R0904).
370
max-public-methods=20
371

372
# Maximum number of return / yield for function / method body.
373
max-returns=6
374

375
# Maximum number of statements in function / method body.
376
max-statements=50
377

378
# Minimum number of public methods for a class (see R0903).
379
min-public-methods=1
380

381

382
[EXCEPTIONS]
383

384
# Exceptions that will emit a warning when caught.
385
overgeneral-exceptions=builtins.BaseException,
386
                       builtins.Exception
387

388

389
[FORMAT]
390

391
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
392
expected-line-ending-format=
393

394
# Regexp for a line that is allowed to be longer than the limit.
395
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
396

397
# Number of spaces of indent required inside a hanging or continued line.
398
indent-after-paren=4
399

400
# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
401
# tab).
402
indent-string='    '
403

404
# Maximum number of characters on a single line.
405
max-line-length=100
406

407
# Maximum number of lines in a module.
408
max-module-lines=1000
409

410
# Allow the body of a class to be on the same line as the declaration if body
411
# contains single statement.
412
single-line-class-stmt=no
413

414
# Allow the body of an if to be on the same line as the test if there is no
415
# else.
416
single-line-if-stmt=no
417

418

419
[IMPORTS]
420

421
# List of modules that can be imported at any level, not just the top level
422
# one.
423
allow-any-import-level=
424

425
# Allow wildcard imports from modules that define __all__.
426
allow-wildcard-with-all=no
427

428
# Deprecated modules which should not be used, separated by a comma.
429
deprecated-modules=PySide2
430

431
# Output a graph (.gv or any supported image format) of external dependencies
432
# to the given file (report RP0402 must not be disabled).
433
ext-import-graph=
434

435
# Output a graph (.gv or any supported image format) of all (i.e. internal and
436
# external) dependencies to the given file (report RP0402 must not be
437
# disabled).
438
import-graph=
439

440
# Output a graph (.gv or any supported image format) of internal dependencies
441
# to the given file (report RP0402 must not be disabled).
442
int-import-graph=
443

444
# Force import order to recognize a module as part of the standard
445
# compatibility libraries.
446
known-standard-library=
447

448
# Force import order to recognize a module as part of a third party library.
449
known-third-party=enchant
450

451
# Couples of modules and preferred modules, separated by a comma.
452
preferred-modules=
453

454

455
[LOGGING]
456

457
# The type of string formatting that logging methods do. `old` means using %
458
# formatting, `new` is for `{}` formatting.
459
logging-format-style=old
460

461
# Logging modules to check that the string format arguments are in logging
462
# function parameter format.
463
logging-modules=logging
464

465

466
[MISCELLANEOUS]
467

468
# List of note tags to take in consideration, separated by a comma.
469
notes=FIXME,
470
      XXX,
471
      TODO
472

473
# Regular expression of note tags to take in consideration.
474
notes-rgx=
475

476

477
[SIMILARITIES]
478

479
# Comments are removed from the similarity computation
480
ignore-comments=yes
481

482
# Docstrings are removed from the similarity computation
483
ignore-docstrings=yes
484

485
# Imports are removed from the similarity computation
486
ignore-imports=yes
487

488
# Signatures are removed from the similarity computation
489
ignore-signatures=yes
490

491
# Minimum lines number of a similarity.
492
min-similarity-lines=4
493

494

495
[SPELLING]
496

497
# Limits count of emitted suggestions for spelling mistakes.
498
max-spelling-suggestions=4
499

500
# Spelling dictionary name. Available dictionaries: none. To make it work,
501
# install the 'python-enchant' package.
502
spelling-dict=
503

504
# List of comma separated words that should be considered directives if they
505
# appear at the beginning of a comment and should not be checked.
506
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
507

508
# List of comma separated words that should not be checked.
509
spelling-ignore-words=
510

511
# A path to a file that contains the private dictionary; one word per line.
512
spelling-private-dict-file=
513

514
# Tells whether to store unknown words to the private dictionary (see the
515
# --spelling-private-dict-file option) instead of raising a message.
516
spelling-store-unknown-words=no
517

518

519
[STRING]
520

521
# This flag controls whether inconsistent-quotes generates a warning when the
522
# character used as a quote delimiter is used inconsistently within a module.
523
check-quote-consistency=no
524

525
# This flag controls whether the implicit-str-concat should generate a warning
526
# on implicit string concatenation in sequences defined over several lines.
527
check-str-concat-over-line-jumps=no
528

529

530
[TYPECHECK]
531

532
# List of decorators that produce context managers, such as
533
# contextlib.contextmanager. Add to this list to register other decorators that
534
# produce valid context managers.
535
contextmanager-decorators=contextlib.contextmanager
536

537
# List of members which are set dynamically and missed by pylint inference
538
# system, and so shouldn't trigger E1101 when accessed. Python regular
539
# expressions are accepted.
540
generated-members=
541

542
# Tells whether to warn about missing members when the owner of the attribute
543
# is inferred to be None.
544
ignore-none=yes
545

546
# This flag controls whether pylint should warn about no-member and similar
547
# checks whenever an opaque object is returned when inferring. The inference
548
# can return multiple potential results while evaluating a Python object, but
549
# some branches might not be evaluated, which results in partial inference. In
550
# that case, it might be useful to still emit no-member and other checks for
551
# the rest of the inferred objects.
552
ignore-on-opaque-inference=yes
553

554
# List of symbolic message names to ignore for Mixin members.
555
ignored-checks-for-mixins=no-member,
556
                          not-async-context-manager,
557
                          not-context-manager,
558
                          attribute-defined-outside-init
559

560
# List of class names for which member attributes should not be checked (useful
561
# for classes with dynamically set attributes). This supports the use of
562
# qualified names.
563
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
564

565
# Show a hint with possible names when a member name was not found. The aspect
566
# of finding the hint is based on edit distance.
567
missing-member-hint=yes
568

569
# The minimum edit distance a name should have in order to be considered a
570
# similar match for a missing member name.
571
missing-member-hint-distance=1
572

573
# The total number of similar names that should be taken in consideration when
574
# showing a hint for a missing member.
575
missing-member-max-choices=1
576

577
# Regex pattern to define which classes are considered mixins.
578
mixin-class-rgx=.*[Mm]ixin
579

580
# List of decorators that change the signature of a decorated function.
581
signature-mutators=
582

583

584
[VARIABLES]
585

586
# List of additional names supposed to be defined in builtins. Remember that
587
# you should avoid defining new builtins when possible.
588
additional-builtins=
589

590
# Tells whether unused global variables should be treated as a violation.
591
allow-global-unused-variables=yes
592

593
# List of names allowed to shadow builtins
594
allowed-redefined-builtins=
595

596
# List of strings which can identify a callback function by name. A callback
597
# name must start or end with one of those strings.
598
callbacks=cb_,
599
          _cb
600

601
# A regular expression matching the name of dummy variables (i.e. expected to
602
# not be used).
603
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
604

605
# Argument names that match this expression will be ignored. Default to name
606
# with leading underscore.
607
ignored-argument-names=_.*|^ignored_|^unused_
608

609
# Tells whether we should check for unused import in __init__ files.
610
init-import=no
611

612
# List of qualified module names which can have objects that can redefine
613
# builtins.
614
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
615

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.