milvus-io_bootcamp
/
pylint.conf
632 строки · 18.9 Кб
1[MASTER]
2
3# Files or directories to be skipped. They should be base names, not paths.
4ignore=CVS, TXT, proto
5
6# Add files or directories matching the regex patterns to the ignore-list. The
7# regex matches against paths.
8ignore-paths=
9
10# Files or directories matching the regex patterns are skipped. The regex
11# matches against base names, not paths.
12ignore-patterns=.*yolo_infer.py,.*paddle_yolo.py
13
14# Python code to execute, usually for sys.path manipulation such as
15# pygtk.require().
16#init-hook=
17
18# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
19# number of processors available to use.
20jobs=1
21
22# Control the amount of potential inferred values when inferring a single
23# object. This can help the performance when dealing with large functions or
24# complex, nested conditions.
25limit-inference-results=100
26
27# List of plugins (as comma separated values of python module names) to load,
28# usually to register additional checkers.
29load-plugins=
30
31# Pickle collected data for later comparisons.
32persistent=no
33
34# Min Python version to use for version dependend checks. Will default to the
35# version used to run pylint.
36py-version=3.8
37
38# When enabled, pylint would attempt to guess common misconfiguration and emit
39# user-friendly hints instead of false-positive error messages.
40suggestion-mode=yes
41
42# Allow loading of arbitrary C extensions. Extensions are imported into the
43# active Python interpreter and may run arbitrary code.
44unsafe-load-any-extension=no
45
46
47[MESSAGES CONTROL]
48
49# Only show warnings with the listed confidence levels. Leave empty to show
50# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
51confidence=
52
53# Disable the message, report, category or checker with the given id(s). You
54# can either give multiple identifiers separated by comma (,) or put this
55# option multiple times (only on the command line, not in the configuration
56# file where it should appear only once). You can also use "--disable=all" to
57# disable everything first and then reenable specific checks. For example, if
58# you want to run only the similarities checker, you can use "--disable=all
59# --enable=similarities". If you want to run only the classes checker, but have
60# no Warning level messages displayed, use "--disable=all --enable=classes
61# --disable=W".
62disable=abstract-method,
63apply-builtin,
64arguments-differ,
65attribute-defined-outside-init,
66backtick,
67bad-option-value,
68basestring-builtin,
69buffer-builtin,
70c-extension-no-member,
71consider-using-enumerate,
72cmp-builtin,
73cmp-method,
74coerce-builtin,
75coerce-method,
76delslice-method,
77div-method,
78duplicate-code,
79eq-without-hash,
80execfile-builtin,
81file-builtin,
82filter-builtin-not-iterating,
83fixme,
84getslice-method,
85global-statement,
86hex-method,
87idiv-method,
88implicit-str-concat-in-sequence,
89import-error,
90import-self,
91import-star-module-level,
92inconsistent-return-statements,
93input-builtin,
94intern-builtin,
95invalid-str-codec,
96locally-disabled,
97long-builtin,
98long-suffix,
99map-builtin-not-iterating,
100misplaced-comparison-constant,
101missing-function-docstring,
102metaclass-assignment,
103next-method-called,
104next-method-defined,
105no-absolute-import,
106no-else-break,
107no-else-continue,
108no-else-raise,
109no-else-return,
110no-init, # added
111no-member,
112no-name-in-module,
113no-self-use,
114nonzero-method,
115oct-method,
116old-division,
117old-ne-operator,
118old-octal-literal,
119old-raise-syntax,
120parameter-unpacking,
121print-statement,
122raising-string,
123range-builtin-not-iterating,
124raw_input-builtin,
125rdiv-method,
126reduce-builtin,
127relative-import,
128reload-builtin,
129round-builtin,
130setslice-method,
131signature-differs,
132standarderror-builtin,
133suppressed-message,
134sys-max-int,
135too-few-public-methods,
136too-many-ancestors,
137too-many-arguments,
138too-many-boolean-expressions,
139too-many-branches,
140too-many-instance-attributes,
141too-many-locals,
142too-many-nested-blocks,
143too-many-public-methods,
144too-many-return-statements,
145too-many-statements,
146trailing-newlines,
147unichr-builtin,
148unicode-builtin,
149unnecessary-pass,
150unpacking-in-except,
151useless-else-on-loop,
152useless-object-inheritance,
153useless-suppression,
154using-cmp-argument,
155wrong-import-order,
156xrange-builtin,
157zip-builtin-not-iterating,
158missing-module-docstring,
159super-init-not-called,
160wrong-import-position,
161bare-except,
162logging-fstring-interpolation,
163logging-format-interpolation,
164
165
166[REPORTS]
167
168# Python expression which should return a score less than or equal to 10. You
169# have access to the variables 'error', 'warning', 'refactor', and 'convention'
170# which contain the number of messages in each category, as well as 'statement'
171# which is the total number of statements analyzed. This score is used by the
172# global evaluation report (RP0004).
173evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
174
175# Template used to display messages. This is a python new-style format string
176# used to format the message information. See doc for all details.
177#msg-template=
178
179# Set the output format. Available formats are text, parseable, colorized, json
180# and msvs (visual studio). You can also give a reporter class, e.g.
181# mypackage.mymodule.MyReporterClass.
182output-format=text
183
184# Tells whether to display a full report or only the messages.
185reports=no
186
187# Activate the evaluation score.
188score=yes
189
190
191[REFACTORING]
192
193# Maximum number of nested blocks for function / method body
194max-nested-blocks=5
195
196# Complete name of functions that never returns. When checking for
197# inconsistent-return-statements if a never returning function is called then
198# it will be considered as an explicit return statement and no message will be
199# printed.
200never-returning-functions=sys.exit,argparse.parse_error
201
202
203[LOGGING]
204
205# The type of string formatting that logging methods do. `old` means using %
206# formatting, `new` is for `{}` formatting.
207logging-format-style=old
208
209# Logging modules to check that the string format arguments are in logging
210# function parameter format.
211logging-modules=logging
212
213
214[SPELLING]
215
216# Limits count of emitted suggestions for spelling mistakes.
217max-spelling-suggestions=4
218
219# Spelling dictionary name. Available dictionaries: none. To make it work,
220# install the 'python-enchant' package.
221spelling-dict=
222
223# List of comma separated words that should be considered directives if they
224# appear and the beginning of a comment and should not be checked.
225spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
226
227# List of comma separated words that should not be checked.
228spelling-ignore-words=
229
230# A path to a file that contains the private dictionary; one word per line.
231spelling-private-dict-file=
232
233# Tells whether to store unknown words to the private dictionary (see the
234# --spelling-private-dict-file option) instead of raising a message.
235spelling-store-unknown-words=no
236
237
238[MISCELLANEOUS]
239
240# List of note tags to take in consideration, separated by a comma.
241notes=FIXME,
242XXX,
243TODO
244
245# Regular expression of note tags to take in consideration.
246#notes-rgx=
247
248
249[TYPECHECK]
250
251# List of decorators that produce context managers, such as
252# contextlib.contextmanager. Add to this list to register other decorators that
253# produce valid context managers.
254contextmanager-decorators=contextlib.contextmanager
255
256# List of members which are set dynamically and missed by pylint inference
257# system, and so shouldn't trigger E1101 when accessed. Python regular
258# expressions are accepted.
259generated-members=
260
261# Tells whether missing members accessed in mixin class should be ignored. A
262# mixin class is detected if its name ends with "mixin" (case insensitive).
263ignore-mixin-members=yes
264
265# Tells whether to warn about missing members when the owner of the attribute
266# is inferred to be None.
267ignore-none=yes
268
269# This flag controls whether pylint should warn about no-member and similar
270# checks whenever an opaque object is returned when inferring. The inference
271# can return multiple potential results while evaluating a Python object, but
272# some branches might not be evaluated, which results in partial inference. In
273# that case, it might be useful to still emit no-member and other checks for
274# the rest of the inferred objects.
275ignore-on-opaque-inference=yes
276
277# List of class names for which member attributes should not be checked (useful
278# for classes with dynamically set attributes). This supports the use of
279# qualified names.
280ignored-classes=optparse.Values,thread._local,_thread._local
281
282# List of module names for which member attributes should not be checked
283# (useful for modules/projects where namespaces are manipulated during runtime
284# and thus existing member attributes cannot be deduced by static analysis). It
285# supports qualified module names, as well as Unix pattern matching.
286ignored-modules=
287
288# Show a hint with possible names when a member name was not found. The aspect
289# of finding the hint is based on edit distance.
290missing-member-hint=yes
291
292# The minimum edit distance a name should have in order to be considered a
293# similar match for a missing member name.
294missing-member-hint-distance=1
295
296# The total number of similar names that should be taken in consideration when
297# showing a hint for a missing member.
298missing-member-max-choices=1
299
300# List of decorators that change the signature of a decorated function.
301signature-mutators=
302
303
304[VARIABLES]
305
306# List of additional names supposed to be defined in builtins. Remember that
307# you should avoid defining new builtins when possible.
308additional-builtins=
309
310# Tells whether unused global variables should be treated as a violation.
311allow-global-unused-variables=yes
312
313# List of names allowed to shadow builtins
314allowed-redefined-builtins=
315
316# List of strings which can identify a callback function by name. A callback
317# name must start or end with one of those strings.
318callbacks=cb_,
319_cb
320
321# A regular expression matching the name of dummy variables (i.e. expected to
322# not be used).
323dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
324
325# Argument names that match this expression will be ignored. Default to name
326# with leading underscore.
327ignored-argument-names=_.*|^ignored_|^unused_
328
329# Tells whether we should check for unused import in __init__ files.
330init-import=no
331
332# List of qualified module names which can have objects that can redefine
333# builtins.
334redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
335
336
337[FORMAT]
338
339# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
340expected-line-ending-format=
341
342# Regexp for a line that is allowed to be longer than the limit.
343ignore-long-lines=^\s*(# )?<?https?://\S+>?$
344
345# Number of spaces of indent required inside a hanging or continued line.
346indent-after-paren=4
347
348# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
349# tab).
350indent-string=' '
351
352# Maximum number of characters on a single line.
353max-line-length=150
354
355# Maximum number of lines in a module.
356max-module-lines=1000
357
358# Allow the body of a class to be on the same line as the declaration if body
359# contains single statement.
360single-line-class-stmt=no
361
362# Allow the body of an if to be on the same line as the test if there is no
363# else.
364single-line-if-stmt=no
365
366
367[SIMILARITIES]
368
369# Comments are removed from the similarity computation
370ignore-comments=yes
371
372# Docstrings are removed from the similarity computation
373ignore-docstrings=yes
374
375# Imports are removed from the similarity computation
376ignore-imports=no
377
378# Signatures are removed from the similarity computation
379ignore-signatures=no
380
381# Minimum lines number of a similarity.
382min-similarity-lines=4
383
384
385[BASIC]
386
387# Naming style matching correct argument names.
388argument-naming-style=snake_case
389
390# Regular expression matching correct argument names. Overrides argument-
391# naming-style.
392#argument-rgx=
393
394# Naming style matching correct attribute names.
395attr-naming-style=any
396
397# Regular expression matching correct attribute names. Overrides attr-naming-
398# style.
399#attr-rgx=
400
401# Bad variable names which should always be refused, separated by a comma.
402bad-names=foo,
403bar,
404baz,
405toto,
406tutu,
407tata
408
409# Bad variable names regexes, separated by a comma. If names match any regex,
410# they will always be refused
411bad-names-rgxs=
412
413# Naming style matching correct class attribute names.
414class-attribute-naming-style=any
415
416# Regular expression matching correct class attribute names. Overrides class-
417# attribute-naming-style.
418#class-attribute-rgx=
419
420# Naming style matching correct class constant names.
421class-const-naming-style=UPPER_CASE
422
423# Regular expression matching correct class constant names. Overrides class-
424# const-naming-style.
425#class-const-rgx=
426
427# Naming style matching correct class names.
428class-naming-style=PascalCase
429
430# Regular expression matching correct class names. Overrides class-naming-
431# style.
432#class-rgx=
433
434# Naming style matching correct constant names.
435const-naming-style=UPPER_CASE
436
437# Regular expression matching correct constant names. Overrides const-naming-
438# style.
439#const-rgx=
440
441# Minimum line length for functions/classes that require docstrings, shorter
442# ones are exempt.
443docstring-min-length=10
444
445# Naming style matching correct function names.
446function-naming-style=snake_case
447
448# Regular expression matching correct function names. Overrides function-
449# naming-style.
450#function-rgx=
451
452# Good variable names which should always be accepted, separated by a comma.
453good-names=i,
454j,
455k,
456ex,
457Run,
458_
459
460# Good variable names regexes, separated by a comma. If names match any regex,
461# they will always be accepted
462good-names-rgxs=
463
464# Include a hint for the correct naming format with invalid-name.
465include-naming-hint=no
466
467# Naming style matching correct inline iteration names.
468inlinevar-naming-style=any
469
470# Regular expression matching correct inline iteration names. Overrides
471# inlinevar-naming-style.
472#inlinevar-rgx=
473
474# Naming style matching correct method names.
475method-naming-style=any
476
477# Regular expression matching correct method names. Overrides method-naming-
478# style.
479#method-rgx=
480
481# Naming style matching correct module names.
482module-naming-style=snake_case
483
484# Regular expression matching correct module names. Overrides module-naming-
485# style.
486#module-rgx=
487
488# Colon-delimited sets of names that determine each other's naming style when
489# the name regexes allow several styles.
490name-group=
491
492# Regular expression which should only match function or class names that do
493# not require a docstring.
494no-docstring-rgx=(__.*__|main|test.*|.*test|.*Test)$
495
496# List of decorators that produce properties, such as abc.abstractproperty. Add
497# to this list to register other decorators that produce valid properties.
498# These decorators are taken in consideration only for invalid-name.
499property-classes=abc.abstractproperty
500
501# Naming style matching correct variable names.
502variable-naming-style=any
503
504# Regular expression matching correct variable names. Overrides variable-
505# naming-style.
506#variable-rgx=
507
508
509[STRING]
510
511# This flag controls whether inconsistent-quotes generates a warning when the
512# character used as a quote delimiter is used inconsistently within a module.
513check-quote-consistency=no
514
515# This flag controls whether the implicit-str-concat should generate a warning
516# on implicit string concatenation in sequences defined over several lines.
517check-str-concat-over-line-jumps=no
518
519
520[IMPORTS]
521
522# List of modules that can be imported at any level, not just the top level
523# one.
524allow-any-import-level=
525
526# Allow wildcard imports from modules that define __all__.
527allow-wildcard-with-all=no
528
529# Analyse import fallback blocks. This can be used to support both Python 2 and
530# 3 compatible code, which means that the block might have code that exists
531# only in one or another interpreter, leading to false positives when analysed.
532analyse-fallback-blocks=no
533
534# Deprecated modules which should not be used, separated by a comma.
535deprecated-modules=regsub,
536TERMIOS,
537Bastion,
538rexec,
539sets
540
541# Output a graph (.gv or any supported image format) of external dependencies
542# to the given file (report RP0402 must not be disabled).
543ext-import-graph=
544
545# Output a graph (.gv or any supported image format) of all (i.e. internal and
546# external) dependencies to the given file (report RP0402 must not be
547# disabled).
548import-graph=
549
550# Output a graph (.gv or any supported image format) of internal dependencies
551# to the given file (report RP0402 must not be disabled).
552int-import-graph=
553
554# Force import order to recognize a module as part of the standard
555# compatibility libraries.
556known-standard-library=
557
558# Force import order to recognize a module as part of a third party library.
559known-third-party=enchant
560
561# Couples of modules and preferred modules, separated by a comma.
562preferred-modules=
563
564
565[CLASSES]
566
567# Warn about protected attribute access inside special methods
568check-protected-access-in-special-methods=no
569
570# List of method names used to declare (i.e. assign) instance attributes.
571defining-attr-methods=__init__,
572__new__,
573setUp,
574__post_init__
575
576# List of member names, which should be excluded from the protected access
577# warning.
578exclude-protected=_asdict,
579_fields,
580_replace,
581_source,
582_make
583
584# List of valid names for the first argument in a class method.
585valid-classmethod-first-arg=cls
586
587# List of valid names for the first argument in a metaclass class method.
588valid-metaclass-classmethod-first-arg=cls
589
590
591[DESIGN]
592
593# List of qualified class names to ignore when counting class parents (see
594# R0901)
595ignored-parents=
596
597# Maximum number of arguments for function / method.
598max-args=5
599
600# Maximum number of attributes for a class (see R0902).
601max-attributes=7
602
603# Maximum number of boolean expressions in an if statement (see R0916).
604max-bool-expr=5
605
606# Maximum number of branch for function / method body.
607max-branches=12
608
609# Maximum number of locals for function / method body.
610max-locals=15
611
612# Maximum number of parents for a class (see R0901).
613max-parents=7
614
615# Maximum number of public methods for a class (see R0904).
616max-public-methods=20
617
618# Maximum number of return / yield for function / method body.
619max-returns=6
620
621# Maximum number of statements in function / method body.
622max-statements=50
623
624# Minimum number of public methods for a class (see R0903).
625min-public-methods=2
626
627
628[EXCEPTIONS]
629
630# Exceptions that will emit a warning when being caught. Defaults to
631# "BaseException, Exception".
632overgeneral-exceptions=StandardError
633