diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-07-17 21:50:58 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-07-17 21:50:58 +0200 |
commit | bfedbd36e7c1caca61ea8bdf8629f55279e239a6 (patch) | |
tree | 0dcaecbddc5972da87f2e71d6c2f50650ddbd969 /examples | |
parent | 7e63ebe2c3187c3b3d9e80e4a407de77002e89e5 (diff) | |
parent | 566ffca72a1a08c9e7ec14383c4710d64165c592 (diff) | |
download | pylint-git-bfedbd36e7c1caca61ea8bdf8629f55279e239a6.tar.gz |
Merge 'origin/maintenance/2.14.x' into main following 2.14.5 release
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pylintrc | 372 | ||||
-rw-r--r-- | examples/pyproject.toml | 6 |
2 files changed, 189 insertions, 189 deletions
diff --git a/examples/pylintrc b/examples/pylintrc index 8bf0ca71e..d3f27833b 100644 --- a/examples/pylintrc +++ b/examples/pylintrc @@ -82,7 +82,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.8 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no @@ -160,15 +160,23 @@ disable=raw-checker-failed, enable=c-extension-no-member -[STRING] +[EXCEPTIONS] -# This flag controls whether inconsistent-quotes generates a warning when the -# character used as a quote delimiter is used inconsistently within a module. -check-quote-consistency=no +# Exceptions that will emit a warning when caught. +overgeneral-exceptions=BaseException, + Exception -# This flag controls whether the implicit-str-concat should generate a warning -# on implicit string concatenation in sequences defined over several lines. -check-str-concat-over-line-jumps=no + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + +# Complete name of functions that never returns. When checking for +# inconsistent-return-statements if a never returning function is called then +# it will be considered as an explicit return statement and no message will be +# printed. +never-returning-functions=sys.exit,argparse.parse_error [DESIGN] @@ -212,94 +220,66 @@ max-statements=50 min-public-methods=2 -[LOGGING] - -# The type of string formatting that logging methods do. `old` means using % -# formatting, `new` is for `{}` formatting. -logging-format-style=old - -# Logging modules to check that the string format arguments are in logging -# function parameter format. -logging-modules=logging - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members= - -# Tells whether to warn about missing members when the owner of the attribute -# is inferred to be None. -ignore-none=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=yes - -# List of symbolic message names to ignore for Mixin members. -ignored-checks-for-mixins=no-member, - not-async-context-manager, - not-context-manager, - attribute-defined-outside-init +[IMPORTS] -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace +# List of modules that can be imported at any level, not just the top level +# one. +allow-any-import-level= -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 +# Deprecated modules which should not be used, separated by a comma. +deprecated-modules= -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 +# Output a graph (.gv or any supported image format) of external dependencies +# to the given file (report RP0402 must not be disabled). +ext-import-graph= -# Regex pattern to define which classes are considered mixins. -mixin-class-rgx=.*[Mm]ixin +# Output a graph (.gv or any supported image format) of all (i.e. internal and +# external) dependencies to the given file (report RP0402 must not be +# disabled). +import-graph= -# List of decorators that change the signature of a decorated function. -signature-mutators= +# Output a graph (.gv or any supported image format) of internal dependencies +# to the given file (report RP0402 must not be disabled). +int-import-graph= +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= -[EXCEPTIONS] +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant -# Exceptions that will emit a warning when caught. -overgeneral-exceptions=BaseException, - Exception +# Couples of modules and preferred modules, separated by a comma. +preferred-modules= -[SIMILARITIES] +[CLASSES] -# Comments are removed from the similarity computation -ignore-comments=yes +# Warn about protected attribute access inside special methods +check-protected-access-in-special-methods=no -# Docstrings are removed from the similarity computation -ignore-docstrings=yes +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__, + __new__, + setUp, + __post_init__ -# Imports are removed from the similarity computation -ignore-imports=yes +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict, + _fields, + _replace, + _source, + _make -# Signatures are removed from the similarity computation -ignore-signatures=yes +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls -# Minimum lines number of a similarity. -min-similarity-lines=4 +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=cls [BASIC] @@ -438,119 +418,33 @@ variable-naming-style=snake_case #variable-rgx= -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -expected-line-ending-format= - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )?<?https?://\S+>?$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - -# Maximum number of characters on a single line. -max-line-length=100 - -# Maximum number of lines in a module. -max-module-lines=1000 - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[IMPORTS] - -# List of modules that can be imported at any level, not just the top level -# one. -allow-any-import-level= - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Deprecated modules which should not be used, separated by a comma. -deprecated-modules= - -# Output a graph (.gv or any supported image format) of external dependencies -# to the given file (report RP0402 must not be disabled). -ext-import-graph= - -# Output a graph (.gv or any supported image format) of all (i.e. internal and -# external) dependencies to the given file (report RP0402 must not be -# disabled). -import-graph= - -# Output a graph (.gv or any supported image format) of internal dependencies -# to the given file (report RP0402 must not be disabled). -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - -# Couples of modules and preferred modules, separated by a comma. -preferred-modules= - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME, - XXX, - TODO - -# Regular expression of note tags to take in consideration. -notes-rgx= - - -[CLASSES] +[SIMILARITIES] -# Warn about protected attribute access inside special methods -check-protected-access-in-special-methods=no +# Comments are removed from the similarity computation +ignore-comments=yes -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__, - __new__, - setUp, - __post_init__ +# Docstrings are removed from the similarity computation +ignore-docstrings=yes -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict, - _fields, - _replace, - _source, - _make +# Imports are removed from the similarity computation +ignore-imports=yes -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls +# Signatures are removed from the similarity computation +ignore-signatures=yes -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=cls +# Minimum lines number of a similarity. +min-similarity-lines=4 -[REFACTORING] +[LOGGING] -# Maximum number of nested blocks for function / method body -max-nested-blocks=5 +# The type of string formatting that logging methods do. `old` means using % +# formatting, `new` is for `{}` formatting. +logging-format-style=old -# Complete name of functions that never returns. When checking for -# inconsistent-return-statements if a never returning function is called then -# it will be considered as an explicit return statement and no message will be -# printed. -never-returning-functions=sys.exit,argparse.parse_error +# Logging modules to check that the string format arguments are in logging +# function parameter format. +logging-modules=logging [VARIABLES] @@ -591,8 +485,8 @@ redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 -# Spelling dictionary name. Available dictionaries: en_GB (aspell), en_US -# (hunspell), en_AU (aspell), en (aspell), en_CA (aspell). +# Spelling dictionary name. Available dictionaries: en (aspell), en_AU +# (aspell), en_CA (aspell), en_GB (aspell), en_US (aspell). spelling-dict= # List of comma separated words that should be considered directives if they @@ -608,3 +502,109 @@ spelling-private-dict-file= # Tells whether to store unknown words to the private dictionary (see the # --spelling-private-dict-file option) instead of raising a message. spelling-store-unknown-words=no + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )?<?https?://\S+>?$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module. +max-module-lines=1000 + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME, + XXX, + TODO + +# Regular expression of note tags to take in consideration. +notes-rgx= + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether to warn about missing members when the owner of the attribute +# is inferred to be None. +ignore-none=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of symbolic message names to ignore for Mixin members. +ignored-checks-for-mixins=no-member, + not-async-context-manager, + not-context-manager, + attribute-defined-outside-init + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + +# Regex pattern to define which classes are considered mixins. +mixin-class-rgx=.*[Mm]ixin + +# List of decorators that change the signature of a decorated function. +signature-mutators= + + +[STRING] + +# This flag controls whether inconsistent-quotes generates a warning when the +# character used as a quote delimiter is used inconsistently within a module. +check-quote-consistency=no + +# This flag controls whether the implicit-str-concat should generate a warning +# on implicit string concatenation in sequences defined over several lines. +check-str-concat-over-line-jumps=no diff --git a/examples/pyproject.toml b/examples/pyproject.toml index 0339afe14..4147184a8 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -71,7 +71,7 @@ persistent = true # Minimum Python version to use for version dependent checks. Will default to the # version used to run pylint. -py-version = "3.8" +py-version = "3.10" # Discover python modules and packages in the file system subtree. # recursive = @@ -412,8 +412,8 @@ min-similarity-lines = 4 # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions = 4 -# Spelling dictionary name. Available dictionaries: en_GB (aspell), en_US -# (hunspell), en_AU (aspell), en (aspell), en_CA (aspell). +# Spelling dictionary name. Available dictionaries: en (aspell), en_AU (aspell), +# en_CA (aspell), en_GB (aspell), en_US (aspell). # spelling-dict = # List of comma separated words that should be considered directives if they |