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