portage

Форк
0
/
pylintrc 
485 строк · 14.8 Кб
1
[MASTER]
2

3
# Disable the message, report, category or checker with the given id(s). You
4
# can either give multiple identifiers separated by comma (,) or put this
5
# option multiple times (only on the command line, not in the configuration
6
# file where it should appear only once). You can also use "--/
7
# disable=all" to
8
# disable everything first and then reenable specific checks. For example, if
9
# you want to run only the similarities checker, you can use "--disable=all
10
# --enable=similarities". If you want to run only the classes checker, but have
11
# no Warning level messages displayed, use "--disable=all --enable=classes
12
# --disable=W".
13
#disable=no-absolute-import,bad-continuation,C0103,C0114,C0115,E1101,W0201,no-name-in-module
14
disable=all
15
enable=
16
        import-error,
17
        import-self,
18
        misplaced-future,
19
        missing-final-newline,
20
        mixed-line-endings,
21
        multiple-imports,
22
        redefined-builtin,
23
        reimported,
24
        relative-beyond-top-level,
25
        superfluous-parens,
26
        trailing-comma-tuple,
27
        trailing-newlines,
28
        trailing-whitespace,
29
        unexpected-line-ending-format,
30
        ungrouped-imports,
31
        unnecessary-semicolon,
32
        unused-import,
33
        useless-import-alias,
34
        useless-object-inheritance,
35
        useless-return,
36
        wildcard-import
37

38
# A comma-separated list of package or module names from where C extensions may
39
# be loaded. Extensions are loading into the active Python interpreter and may
40
# run arbitrary code.
41
extension-pkg-whitelist=
42

43
# Add files or directories to the blacklist. They should be base names, not
44
# paths.
45
ignore=.git
46

47
# Add files or directories matching the regex patterns to the blacklist. The
48
# regex matches against base names, not paths.
49
ignore-patterns=
50

51
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
52
# number of processors available to use.
53
jobs=0
54

55
# Control the amount of potential inferred values when inferring a single
56
# object. This can help the performance when dealing with large functions or
57
# complex, nested conditions.
58
limit-inference-results=100
59

60
# Pickle collected data for later comparisons.
61
persistent=no
62

63
# When enabled, pylint would attempt to guess common misconfiguration and emit
64
# user-friendly hints instead of false-positive error messages.
65
suggestion-mode=yes
66

67
# Allow loading of arbitrary C extensions. Extensions are imported into the
68
# active Python interpreter and may run arbitrary code.
69
unsafe-load-any-extension=no
70

71
[MESSAGES CONTROL]
72

73
# Only show warnings with the listed confidence levels. Leave empty to show
74
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
75
confidence=
76

77
[REPORTS]
78

79
# Python expression which should return a score less than or equal to 10. You
80
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
81
# which contain the number of messages in each category, as well as 'statement'
82
# which is the total number of statements analyzed. This score is used by the
83
# global evaluation report (RP0004).
84
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
85

86
# Set the output format. Available formats are text, parseable, colorized, json
87
# and msvs (visual studio). You can also give a reporter class, e.g.
88
# mypackage.mymodule.MyReporterClass.
89
output-format=text
90

91
# Tells whether to display a full report or only the messages.
92
reports=no
93

94
# Activate the evaluation score.
95
score=yes
96

97
[REFACTORING]
98

99
# Maximum number of nested blocks for function / method body
100
max-nested-blocks=5
101

102
# Complete name of functions that never returns. When checking for
103
# inconsistent-return-statements if a never returning function is called then
104
# it will be considered as an explicit return statement and no message will be
105
# printed.
106
never-returning-functions=sys.exit
107

108
[BASIC]
109

110
# Naming style matching correct argument names.
111
argument-naming-style=snake_case
112

113
# Naming style matching correct attribute names.
114
attr-naming-style=snake_case
115

116
# Regular expression matching correct attribute names. Overrides attr-naming-
117
# style.
118
#attr-rgx=
119

120
# Bad variable names which should always be refused, separated by a comma.
121
bad-names=
122

123
# Naming style matching correct class attribute names.
124
class-attribute-naming-style=any
125

126
# Naming style matching correct class names.
127
class-naming-style=PascalCase
128

129
# Naming style matching correct constant names.
130
const-naming-style=UPPER_CASE
131

132
# Regular expression matching correct constant names. Overrides const-naming-
133
# style.
134
#const-rgx=
135

136
# Minimum line length for functions/classes that require docstrings, shorter
137
# ones are exempt.
138
docstring-min-length=-1
139

140
# Naming style matching correct function names.
141
function-naming-style=snake_case
142

143
# Regular expression matching correct function names. Overrides function-
144
# naming-style.
145
#function-rgx=
146

147
# Good variable names which should always be accepted, separated by a comma.
148
good-names=i,
149
           j,
150
           k,
151
           ex,
152
           Run,
153
					 e,
154
           _
155

156
# Include a hint for the correct naming format with invalid-name.
157
include-naming-hint=no
158

159
# Naming style matching correct inline iteration names.
160
inlinevar-naming-style=any
161

162
# Regular expression matching correct inline iteration names. Overrides
163
# inlinevar-naming-style.
164
#inlinevar-rgx=
165

166
# Naming style matching correct method names.
167
method-naming-style=snake_case
168

169
# Regular expression matching correct method names. Overrides method-naming-
170
# style.
171
#method-rgx=
172

173
# Naming style matching correct module names.
174
module-naming-style=snake_case
175

176
# Regular expression matching correct module names. Overrides module-naming-
177
# style.
178
#module-rgx=
179

180
# Colon-delimited sets of names that determine each other's naming style when
181
# the name regexes allow several styles.
182
name-group=
183

184
# Regular expression which should only match function or class names that do
185
# not require a docstring.
186
no-docstring-rgx=^_
187

188
# List of decorators that produce properties, such as abc.abstractproperty. Add
189
# to this list to register other decorators that produce valid properties.
190
# These decorators are taken in consideration only for invalid-name.
191
property-classes=abc.abstractproperty
192

193
# Naming style matching correct variable names.
194
variable-naming-style=snake_case
195

196
# Regular expression matching correct variable names. Overrides variable-
197
# naming-style.
198
#variable-rgx=
199

200

201
[FORMAT]
202

203
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
204
expected-line-ending-format=
205

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

209
# Number of spaces of indent required inside a hanging or continued line.
210
indent-after-paren=4
211

212
# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
213
# tab).
214
indent-string='\t'
215

216
# Maximum number of characters on a single line.
217
max-line-length=100
218

219
# Maximum number of lines in a module.
220
max-module-lines=10000
221

222
# List of optional constructs for which whitespace checking is disabled. `dict-
223
# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
224
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
225
# `empty-line` allows space-only lines.
226
no-space-check=trailing-comma,
227
               dict-separator
228

229
# Allow the body of a class to be on the same line as the declaration if body
230
# contains single statement.
231
single-line-class-stmt=no
232

233
# Allow the body of an if to be on the same line as the test if there is no
234
# else.
235
single-line-if-stmt=no
236

237

238
[LOGGING]
239

240
# Format style used to check logging format string. `old` means using %
241
# formatting, `new` is for `{}` formatting,and `fstr` is for f-strings.
242
logging-format-style=old
243

244
# Logging modules to check that the string format arguments are in logging
245
# function parameter format.
246
logging-modules=logging
247

248

249
[MISCELLANEOUS]
250

251
# List of note tags to take in consideration, separated by a comma.
252
notes=FIXME,
253
      XXX,
254
      TODO
255

256

257
[SIMILARITIES]
258

259
# Ignore comments when computing similarities.
260
ignore-comments=yes
261

262
# Ignore docstrings when computing similarities.
263
ignore-docstrings=yes
264

265
# Ignore imports when computing similarities.
266
ignore-imports=no
267

268
# Minimum lines number of a similarity.
269
min-similarity-lines=4
270

271

272
[SPELLING]
273

274
# Limits count of emitted suggestions for spelling mistakes.
275
max-spelling-suggestions=4
276

277
# Spelling dictionary name. Available dictionaries: none. To make it work,
278
# install the python-enchant package.
279
spelling-dict=
280

281
# List of comma separated words that should not be checked.
282
spelling-ignore-words=
283

284
# A path to a file that contains the private dictionary; one word per line.
285
spelling-private-dict-file=
286

287
# Tells whether to store unknown words to the private dictionary (see the
288
# --spelling-private-dict-file option) instead of raising a message.
289
spelling-store-unknown-words=no
290

291

292
[STRING]
293

294
# This flag controls whether the implicit-str-concat-in-sequence should
295
# generate a warning on implicit string concatenation in sequences defined over
296
# several lines.
297
check-str-concat-over-line-jumps=no
298

299

300
[TYPECHECK]
301

302
# List of decorators that produce context managers, such as
303
# contextlib.contextmanager. Add to this list to register other decorators that
304
# produce valid context managers.
305
contextmanager-decorators=contextlib.contextmanager
306

307
# List of members which are set dynamically and missed by pylint inference
308
# system, and so shouldn't trigger E1101 when accessed. Python regular
309
# expressions are accepted.
310
generated-members=
311

312
# Tells whether missing members accessed in mixin class should be ignored. A
313
# mixin class is detected if its name ends with "mixin" (case insensitive).
314
ignore-mixin-members=yes
315

316
# Tells whether to warn about missing members when the owner of the attribute
317
# is inferred to be None.
318
ignore-none=yes
319

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

328
# List of class names for which member attributes should not be checked (useful
329
# for classes with dynamically set attributes). This supports the use of
330
# qualified names.
331
ignored-classes=optparse.Values,thread._local,_thread._local
332

333
# List of module names for which member attributes should not be checked
334
# (useful for modules/projects where namespaces are manipulated during runtime
335
# and thus existing member attributes cannot be deduced by static analysis). It
336
# supports qualified module names, as well as Unix pattern matching.
337
ignored-modules=
338

339
# Show a hint with possible names when a member name was not found. The aspect
340
# of finding the hint is based on edit distance.
341
missing-member-hint=yes
342

343
# The minimum edit distance a name should have in order to be considered a
344
# similar match for a missing member name.
345
missing-member-hint-distance=1
346

347
# The total number of similar names that should be taken in consideration when
348
# showing a hint for a missing member.
349
missing-member-max-choices=1
350

351
# List of decorators that change the signature of a decorated function.
352
signature-mutators=
353

354

355
[VARIABLES]
356

357
# List of additional names supposed to be defined in builtins. Remember that
358
# you should avoid defining new builtins when possible.
359
additional-builtins=
360

361
# Tells whether unused global variables should be treated as a violation.
362
allow-global-unused-variables=yes
363

364
# List of strings which can identify a callback function by name. A callback
365
# name must start or end with one of those strings.
366
callbacks=cb_,
367
          _cb
368

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

373
# Argument names that match this expression will be ignored. Default to name
374
# with leading underscore.
375
ignored-argument-names=_.*|^ignored_|^unused_
376

377
# Tells whether we should check for unused import in __init__ files.
378
init-import=no
379

380
# List of qualified module names which can have objects that can redefine
381
# builtins.
382
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
383

384

385
[CLASSES]
386

387
# List of method names used to declare (i.e. assign) instance attributes.
388
defining-attr-methods=__init__,
389
                      __new__,
390
                      setUp,
391
                      __post_init__
392

393
# List of member names, which should be excluded from the protected access
394
# warning.
395
exclude-protected=_asdict,
396
                  _fields,
397
                  _replace,
398
                  _source,
399
                  _make
400

401
# List of valid names for the first argument in a class method.
402
valid-classmethod-first-arg=cls
403

404
# List of valid names for the first argument in a metaclass class method.
405
valid-metaclass-classmethod-first-arg=cls
406

407

408
[DESIGN]
409

410
# Maximum number of arguments for function / method.
411
max-args=5
412

413
# Maximum number of attributes for a class (see R0902).
414
max-attributes=7
415

416
# Maximum number of boolean expressions in an if statement (see R0916).
417
max-bool-expr=5
418

419
# Maximum number of branch for function / method body.
420
max-branches=12
421

422
# Maximum number of locals for function / method body.
423
max-locals=15
424

425
# Maximum number of parents for a class (see R0901).
426
max-parents=7
427

428
# Maximum number of public methods for a class (see R0904).
429
max-public-methods=20
430

431
# Maximum number of return / yield for function / method body.
432
max-returns=6
433

434
# Maximum number of statements in function / method body.
435
max-statements=50
436

437
# Minimum number of public methods for a class (see R0903).
438
min-public-methods=0
439

440

441
[IMPORTS]
442

443
# List of modules that can be imported at any level, not just the top level
444
# one.
445
allow-any-import-level=
446

447
# Allow wildcard imports from modules that define __all__.
448
allow-wildcard-with-all=no
449

450
# Analyse import fallback blocks. This can be used to support both Python 2 and
451
# 3 compatible code, which means that the block might have code that exists
452
# only in one or another interpreter, leading to false positives when analysed.
453
analyse-fallback-blocks=no
454

455
# Deprecated modules which should not be used, separated by a comma.
456
deprecated-modules=optparse,tkinter.tix
457

458
# Create a graph of external dependencies in the given file (report RP0402 must
459
# not be disabled).
460
ext-import-graph=
461

462
# Create a graph of every (i.e. internal and external) dependencies in the
463
# given file (report RP0402 must not be disabled).
464
import-graph=
465

466
# Create a graph of internal dependencies in the given file (report RP0402 must
467
# not be disabled).
468
int-import-graph=
469

470
# Force import order to recognize a module as part of the standard
471
# compatibility libraries.
472
known-standard-library=
473

474
# Force import order to recognize a module as part of a third party library.
475
known-third-party=enchant
476

477
# Couples of modules and preferred modules, separated by a comma.
478
preferred-modules=
479

480

481
[EXCEPTIONS]
482

483
# Exceptions that will emit a warning when being caught. Defaults to
484
# "BaseException, Exception".
485
overgeneral-exceptions=BaseException
486

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

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

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

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