MetaGPT

Форк
0
/
.pylintrc 
639 строк · 20.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=no
7

8
# Clear in-memory caches upon conclusion of linting. Useful if running pylint
9
# in a server-like mode.
10
clear-cache-post-run=no
11

12
# Load and enable all available extensions. Use --list-extensions to see a list
13
# all available extensions.
14
#enable-all-extensions=
15

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

21
# Always return a 0 (non-error) status code, even if lint errors are found.
22
# This is primarily useful in continuous integration scripts.
23
#exit-zero=
24

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

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

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

41
# Specify a score threshold under which the program will exit with error.
42
fail-under=10
43

44
# Interpret the stdin as a python script, whose filename needs to be passed as
45
# the module_or_package argument.
46
#from-stdin=
47

48
# Files or directories to be skipped. They should be base names, not paths.
49
ignore=CVS
50

51
# Add files or directories matching the regular expressions patterns to the
52
# ignore-list. The regex matches against paths and can be in Posix or Windows
53
# format. Because '\\' represents the directory delimiter on Windows systems,
54
# it can't be used as an escape character.
55
ignore-paths=
56

57
# Files or directories matching the regular expression patterns are skipped.
58
# The regex matches against base names, not paths. The default value ignores
59
# Emacs file locks
60
#ignore-patterns=^\.#
61
ignore-patterns=(.)*_test\.py,test_(.)*\.py
62

63

64
# List of module names for which member attributes should not be checked
65
# (useful for modules/projects where namespaces are manipulated during runtime
66
# and thus existing member attributes cannot be deduced by static analysis). It
67
# supports qualified module names, as well as Unix pattern matching.
68
ignored-modules=
69

70
# Python code to execute, usually for sys.path manipulation such as
71
# pygtk.require().
72
#init-hook=
73

74
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
75
# number of processors available to use, and will cap the count on Windows to
76
# avoid hangs.
77
jobs=1
78

79
# Control the amount of potential inferred values when inferring a single
80
# object. This can help the performance when dealing with large functions or
81
# complex, nested conditions.
82
limit-inference-results=120
83

84
# List of plugins (as comma separated values of python module names) to load,
85
# usually to register additional checkers.
86
load-plugins=
87

88
# Pickle collected data for later comparisons.
89
persistent=yes
90

91
# Minimum Python version to use for version dependent checks. Will default to
92
# the version used to run pylint.
93
py-version=3.9
94

95
# Discover python modules and packages in the file system subtree.
96
recursive=no
97

98
# Add paths to the list of the source roots. Supports globbing patterns. The
99
# source root is an absolute path or a path relative to the current working
100
# directory used to determine a package namespace for modules located under the
101
# source root.
102
source-roots=
103

104
# When enabled, pylint would attempt to guess common misconfiguration and emit
105
# user-friendly hints instead of false-positive error messages.
106
suggestion-mode=yes
107

108
# Allow loading of arbitrary C extensions. Extensions are imported into the
109
# active Python interpreter and may run arbitrary code.
110
unsafe-load-any-extension=no
111

112
# In verbose mode, extra non-checker-related info will be displayed.
113
#verbose=
114

115

116
[BASIC]
117

118
# Naming style matching correct argument names.
119
argument-naming-style=snake_case
120

121
# Regular expression matching correct argument names. Overrides argument-
122
# naming-style. If left empty, argument names will be checked with the set
123
# naming style.
124
#argument-rgx=
125

126
# Naming style matching correct attribute names.
127
attr-naming-style=snake_case
128

129
# Regular expression matching correct attribute names. Overrides attr-naming-
130
# style. If left empty, attribute names will be checked with the set naming
131
# style.
132
#attr-rgx=
133

134
# Bad variable names which should always be refused, separated by a comma.
135
bad-names=foo,
136
          bar,
137
          baz,
138
          toto,
139
          tutu,
140
          tata
141

142
# Bad variable names regexes, separated by a comma. If names match any regex,
143
# they will always be refused
144
bad-names-rgxs=
145

146
# Naming style matching correct class attribute names.
147
class-attribute-naming-style=any
148

149
# Regular expression matching correct class attribute names. Overrides class-
150
# attribute-naming-style. If left empty, class attribute names will be checked
151
# with the set naming style.
152
#class-attribute-rgx=
153

154
# Naming style matching correct class constant names.
155
class-const-naming-style=UPPER_CASE
156

157
# Regular expression matching correct class constant names. Overrides class-
158
# const-naming-style. If left empty, class constant names will be checked with
159
# the set naming style.
160
#class-const-rgx=
161

162
# Naming style matching correct class names.
163
class-naming-style=PascalCase
164

165
# Regular expression matching correct class names. Overrides class-naming-
166
# style. If left empty, class names will be checked with the set naming style.
167
#class-rgx=
168

169
# Naming style matching correct constant names.
170
const-naming-style=UPPER_CASE
171

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

177
# Minimum line length for functions/classes that require docstrings, shorter
178
# ones are exempt.
179
docstring-min-length=-1
180

181
# Naming style matching correct function names.
182
function-naming-style=snake_case
183

184
# Regular expression matching correct function names. Overrides function-
185
# naming-style. If left empty, function names will be checked with the set
186
# naming style.
187
#function-rgx=
188

189
# Good variable names which should always be accepted, separated by a comma.
190
good-names=i,
191
           j,
192
           k,
193
           v,
194
           e,
195
           d,
196
           m,
197
           df,
198
           ex,
199
           Run,
200
           _
201

202
# Good variable names regexes, separated by a comma. If names match any regex,
203
# they will always be accepted
204
good-names-rgxs=
205

206
# Include a hint for the correct naming format with invalid-name.
207
include-naming-hint=no
208

209
# Naming style matching correct inline iteration names.
210
inlinevar-naming-style=any
211

212
# Regular expression matching correct inline iteration names. Overrides
213
# inlinevar-naming-style. If left empty, inline iteration names will be checked
214
# with the set naming style.
215
#inlinevar-rgx=
216

217
# Naming style matching correct method names.
218
method-naming-style=snake_case
219

220
# Regular expression matching correct method names. Overrides method-naming-
221
# style. If left empty, method names will be checked with the set naming style.
222
#method-rgx=
223

224
# Naming style matching correct module names.
225
module-naming-style=snake_case
226

227
# Regular expression matching correct module names. Overrides module-naming-
228
# style. If left empty, module names will be checked with the set naming style.
229
#module-rgx=
230

231
# Colon-delimited sets of names that determine each other's naming style when
232
# the name regexes allow several styles.
233
name-group=
234

235
# Regular expression which should only match function or class names that do
236
# not require a docstring.
237
no-docstring-rgx=^_
238

239
# List of decorators that produce properties, such as abc.abstractproperty. Add
240
# to this list to register other decorators that produce valid properties.
241
# These decorators are taken in consideration only for invalid-name.
242
property-classes=abc.abstractproperty
243

244
# Regular expression matching correct type alias names. If left empty, type
245
# alias names will be checked with the set naming style.
246
#typealias-rgx=
247

248
# Regular expression matching correct type variable names. If left empty, type
249
# variable names will be checked with the set naming style.
250
#typevar-rgx=
251

252
# Naming style matching correct variable names.
253
variable-naming-style=snake_case
254

255
# Regular expression matching correct variable names. Overrides variable-
256
# naming-style. If left empty, variable names will be checked with the set
257
# naming style.
258
#variable-rgx=
259

260

261
[CLASSES]
262

263
# Warn about protected attribute access inside special methods
264
check-protected-access-in-special-methods=no
265

266
# List of method names used to declare (i.e. assign) instance attributes.
267
defining-attr-methods=__init__,
268
                      __new__,
269
                      setUp,
270
                      __post_init__
271

272
# List of member names, which should be excluded from the protected access
273
# warning.
274
exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
275

276
# List of valid names for the first argument in a class method.
277
valid-classmethod-first-arg=cls
278

279
# List of valid names for the first argument in a metaclass class method.
280
valid-metaclass-classmethod-first-arg=mcs
281

282

283
[DESIGN]
284

285
# List of regular expressions of class ancestor names to ignore when counting
286
# public methods (see R0903)
287
exclude-too-few-public-methods=
288

289
# List of qualified class names to ignore when counting class parents (see
290
# R0901)
291
ignored-parents=
292

293
# Maximum number of arguments for function / method.
294
max-args=5
295

296
# Maximum number of attributes for a class (see R0902).
297
max-attributes=7
298

299
# Maximum number of boolean expressions in an if statement (see R0916).
300
max-bool-expr=5
301

302
# Maximum number of branch for function / method body.
303
max-branches=12
304

305
# Maximum number of locals for function / method body.
306
max-locals=15
307

308
# Maximum number of parents for a class (see R0901).
309
max-parents=7
310

311
# Maximum number of public methods for a class (see R0904).
312
max-public-methods=20
313

314
# Maximum number of return / yield for function / method body.
315
max-returns=6
316

317
# Maximum number of statements in function / method body.
318
max-statements=50
319

320
# Minimum number of public methods for a class (see R0903).
321
min-public-methods=2
322

323

324
[EXCEPTIONS]
325

326
# Exceptions that will emit a warning when caught.
327
overgeneral-exceptions=builtins.BaseException,builtins.Exception
328

329

330
[FORMAT]
331

332
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
333
expected-line-ending-format=
334

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

338
# Number of spaces of indent required inside a hanging or continued line.
339
indent-after-paren=4
340

341
# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
342
# tab).
343
indent-string='    '
344

345
# Maximum number of characters on a single line.
346
max-line-length=120
347

348
# Maximum number of lines in a module.
349
max-module-lines=1000
350

351
# Allow the body of a class to be on the same line as the declaration if body
352
# contains single statement.
353
single-line-class-stmt=no
354

355
# Allow the body of an if to be on the same line as the test if there is no
356
# else.
357
single-line-if-stmt=no
358

359

360
[IMPORTS]
361

362
# List of modules that can be imported at any level, not just the top level
363
# one.
364
allow-any-import-level=
365

366
# Allow explicit reexports by alias from a package __init__.
367
allow-reexport-from-package=no
368

369
# Allow wildcard imports from modules that define __all__.
370
allow-wildcard-with-all=no
371

372
# Deprecated modules which should not be used, separated by a comma.
373
deprecated-modules=
374

375
# Output a graph (.gv or any supported image format) of external dependencies
376
# to the given file (report RP0402 must not be disabled).
377
ext-import-graph=
378

379
# Output a graph (.gv or any supported image format) of all (i.e. internal and
380
# external) dependencies to the given file (report RP0402 must not be
381
# disabled).
382
import-graph=
383

384
# Output a graph (.gv or any supported image format) of internal dependencies
385
# to the given file (report RP0402 must not be disabled).
386
int-import-graph=
387

388
# Force import order to recognize a module as part of the standard
389
# compatibility libraries.
390
known-standard-library=
391

392
# Force import order to recognize a module as part of a third party library.
393
known-third-party=enchant
394

395
# Couples of modules and preferred modules, separated by a comma.
396
preferred-modules=
397

398

399
[LOGGING]
400

401
# The type of string formatting that logging methods do. `old` means using %
402
# formatting, `new` is for `{}` formatting.
403
logging-format-style=old
404

405
# Logging modules to check that the string format arguments are in logging
406
# function parameter format.
407
logging-modules=logging
408

409

410
[MESSAGES CONTROL]
411

412
# Only show warnings with the listed confidence levels. Leave empty to show
413
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
414
# UNDEFINED.
415
confidence=HIGH,
416
           CONTROL_FLOW,
417
           INFERENCE,
418
           INFERENCE_FAILURE,
419
           UNDEFINED
420

421
# Disable the message, report, category or checker with the given id(s). You
422
# can either give multiple identifiers separated by comma (,) or put this
423
# option multiple times (only on the command line, not in the configuration
424
# file where it should appear only once). You can also use "--disable=all" to
425
# disable everything first and then re-enable specific checks. For example, if
426
# you want to run only the similarities checker, you can use "--disable=all
427
# --enable=similarities". If you want to run only the classes checker, but have
428
# no Warning level messages displayed, use "--disable=all --enable=classes
429
# --disable=W".
430
disable=raw-checker-failed,
431
        bad-inline-option,
432
        locally-disabled,
433
        file-ignored,
434
        suppressed-message,
435
        useless-suppression,
436
        deprecated-pragma,
437
        use-symbolic-message-instead,
438
	expression-not-assigned,
439
	pointless-statement
440

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

447

448
[METHOD_ARGS]
449

450
# List of qualified names (i.e., library.method) which require a timeout
451
# parameter e.g. 'requests.api.get,requests.api.post'
452
timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
453

454

455
[MISCELLANEOUS]
456

457
# List of note tags to take in consideration, separated by a comma.
458
notes=FIXME,
459
      XXX,
460
      TODO
461

462
# Regular expression of note tags to take in consideration.
463
notes-rgx=
464

465

466
[REFACTORING]
467

468
# Maximum number of nested blocks for function / method body
469
max-nested-blocks=5
470

471
# Complete name of functions that never returns. When checking for
472
# inconsistent-return-statements if a never returning function is called then
473
# it will be considered as an explicit return statement and no message will be
474
# printed.
475
never-returning-functions=sys.exit,argparse.parse_error
476

477

478
[REPORTS]
479

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

487
# Template used to display messages. This is a python new-style format string
488
# used to format the message information. See doc for all details.
489
msg-template=
490

491
# Set the output format. Available formats are text, parseable, colorized, json
492
# and msvs (visual studio). You can also give a reporter class, e.g.
493
# mypackage.mymodule.MyReporterClass.
494
#output-format=
495

496
# Tells whether to display a full report or only the messages.
497
reports=no
498

499
# Activate the evaluation score.
500
score=yes
501

502

503
[SIMILARITIES]
504

505
# Comments are removed from the similarity computation
506
ignore-comments=yes
507

508
# Docstrings are removed from the similarity computation
509
ignore-docstrings=yes
510

511
# Imports are removed from the similarity computation
512
ignore-imports=yes
513

514
# Signatures are removed from the similarity computation
515
ignore-signatures=yes
516

517
# Minimum lines number of a similarity.
518
min-similarity-lines=4
519

520

521
[SPELLING]
522

523
# Limits count of emitted suggestions for spelling mistakes.
524
max-spelling-suggestions=4
525

526
# Spelling dictionary name. No available dictionaries : You need to install
527
# both the python package and the system dependency for enchant to work..
528
spelling-dict=
529

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

534
# List of comma separated words that should not be checked.
535
spelling-ignore-words=
536

537
# A path to a file that contains the private dictionary; one word per line.
538
spelling-private-dict-file=
539

540
# Tells whether to store unknown words to the private dictionary (see the
541
# --spelling-private-dict-file option) instead of raising a message.
542
spelling-store-unknown-words=no
543

544

545
[STRING]
546

547
# This flag controls whether inconsistent-quotes generates a warning when the
548
# character used as a quote delimiter is used inconsistently within a module.
549
check-quote-consistency=no
550

551
# This flag controls whether the implicit-str-concat should generate a warning
552
# on implicit string concatenation in sequences defined over several lines.
553
check-str-concat-over-line-jumps=no
554

555

556
[TYPECHECK]
557

558
# List of decorators that produce context managers, such as
559
# contextlib.contextmanager. Add to this list to register other decorators that
560
# produce valid context managers.
561
contextmanager-decorators=contextlib.contextmanager
562

563
# List of members which are set dynamically and missed by pylint inference
564
# system, and so shouldn't trigger E1101 when accessed. Python regular
565
# expressions are accepted.
566
generated-members=
567

568
# Tells whether to warn about missing members when the owner of the attribute
569
# is inferred to be None.
570
ignore-none=yes
571

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

580
# List of symbolic message names to ignore for Mixin members.
581
ignored-checks-for-mixins=no-member,
582
                          not-async-context-manager,
583
                          not-context-manager,
584
                          attribute-defined-outside-init
585

586
# List of class names for which member attributes should not be checked (useful
587
# for classes with dynamically set attributes). This supports the use of
588
# qualified names.
589
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
590

591
# Show a hint with possible names when a member name was not found. The aspect
592
# of finding the hint is based on edit distance.
593
missing-member-hint=yes
594

595
# The minimum edit distance a name should have in order to be considered a
596
# similar match for a missing member name.
597
missing-member-hint-distance=1
598

599
# The total number of similar names that should be taken in consideration when
600
# showing a hint for a missing member.
601
missing-member-max-choices=1
602

603
# Regex pattern to define which classes are considered mixins.
604
mixin-class-rgx=.*[Mm]ixin
605

606
# List of decorators that change the signature of a decorated function.
607
signature-mutators=
608

609

610
[VARIABLES]
611

612
# List of additional names supposed to be defined in builtins. Remember that
613
# you should avoid defining new builtins when possible.
614
additional-builtins=
615

616
# Tells whether unused global variables should be treated as a violation.
617
allow-global-unused-variables=yes
618

619
# List of names allowed to shadow builtins
620
allowed-redefined-builtins=
621

622
# List of strings which can identify a callback function by name. A callback
623
# name must start or end with one of those strings.
624
callbacks=cb_,
625
          _cb
626

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

631
# Argument names that match this expression will be ignored.
632
ignored-argument-names=_.*|^ignored_|^unused_
633

634
# Tells whether we should check for unused import in __init__ files.
635
init-import=no
636

637
# List of qualified module names which can have objects that can redefine
638
# builtins.
639
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
640

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

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

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

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