diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dc7143..5db260e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,17 +10,17 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.6", "pypy-3.7" ] + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8", "pypy-3.9" ] regex: [ "1", "0" ] steps: - name: Setup python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Git User config run: | @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v2 + - uses: wagoid/commitlint-github-action@v5 release: if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} @@ -68,16 +68,16 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.9 ] + python-version: [ 3.11 ] steps: - name: Setup python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -99,11 +99,11 @@ jobs: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - name: Merge master to develop - uses: robotology/gh-action-nightly-merge@v1.3.2 + uses: robotology/gh-action-nightly-merge@v1.4.0 with: stable_branch: 'master' development_branch: 'develop' allow_ff: true user_name: github-actions env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pylintrc b/pylintrc index 0f5f9cc..038db17 100644 --- a/pylintrc +++ b/pylintrc @@ -1,388 +1,629 @@ -[MASTER] +[MAIN] -# Specify a configuration file. -#rcfile= +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Clear in-memory caches upon conclusion of linting. Useful if running pylint +# in a server-like mode. +clear-cache-post-run=no + +# Load and enable all available extensions. Use --list-extensions to see a list +# all available extensions. +#enable-all-extensions= + +# In error mode, messages with a category besides ERROR or FATAL are +# suppressed, and no reports are done by default. Error mode is compatible with +# disabling specific errors. +#errors-only= + +# Always return a 0 (non-error) status code, even if lint errors are found. +# This is primarily useful in continuous integration scripts. +#exit-zero= + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. +extension-pkg-allow-list= + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. (This is an alternative name to extension-pkg-allow-list +# for backward compatibility.) +extension-pkg-whitelist= + +# Return non-zero exit code if any of these messages/categories are detected, +# even if score is above --fail-under value. Syntax same as enable. Messages +# specified are enabled, while categories only check already-enabled messages. +fail-on= + +# Specify a score threshold under which the program will exit with error. +fail-under=10 + +# Interpret the stdin as a python script, whose filename needs to be passed as +# the module_or_package argument. +#from-stdin= + +# Files or directories to be skipped. They should be base names, not paths. +ignore=CVS + +# Add files or directories matching the regular expressions patterns to the +# ignore-list. The regex matches against paths and can be in Posix or Windows +# format. Because '\\' represents the directory delimiter on Windows systems, +# it can't be used as an escape character. +ignore-paths= + +# Files or directories matching the regular expression patterns are skipped. +# The regex matches against base names, not paths. The default value ignores +# Emacs file locks +ignore-patterns=^\.# + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis). It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= -# Add files or directories to the blacklist. They should be base names, not -# paths. -ignore=CVS +# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the +# number of processors available to use, and will cap the count on Windows to +# avoid hangs. +jobs=1 -# Pickle collected data for later comparisons. -persistent=yes +# Control the amount of potential inferred values when inferring a single +# object. This can help the performance when dealing with large functions or +# complex, nested conditions. +limit-inference-results=100 -# List of plugins (as comma separated values of python modules names) to load, +# List of plugins (as comma separated values of python module names) to load, # usually to register additional checkers. load-plugins= -# Use multiple processes to speed up Pylint. -jobs=1 +# Pickle collected data for later comparisons. +persistent=yes + +# Minimum Python version to use for version dependent checks. Will default to +# the version used to run pylint. +py-version=3.7 + +# Discover python modules and packages in the file system subtree. +recursive=no + +# When enabled, pylint would attempt to guess common misconfiguration and emit +# user-friendly hints instead of false-positive error messages. +suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code -extension-pkg-whitelist= +# In verbose mode, extra non-checker-related info will be displayed. +#verbose= -# Allow optimization of some AST trees. This will activate a peephole AST -# optimizer, which will apply various small optimizations. For instance, it can -# be used to obtain the result of joining multiple strings with the addition -# operator. Joining a lot of strings can lead to a maximum recursion error in -# Pylint and this flag can prevent that. It has one side effect, the resulting -# AST will be different than the one from reality. -optimize-ast=no +[BASIC] -[MESSAGES CONTROL] +# Naming style matching correct argument names. +argument-naming-style=snake_case -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED -confidence= +# Regular expression matching correct argument names. Overrides argument- +# naming-style. If left empty, argument names will be checked with the set +# naming style. +#argument-rgx= -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time. See also the "--disable" option for examples. -#enable= +# Naming style matching correct attribute names. +attr-naming-style=snake_case -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use"--disable=all --enable=classes -# --disable=W" -disable=basestring-builtin,range-builtin-not-iterating,unichr-builtin,buffer-builtin,dict-iter-method,hex-method, - setslice-method,long-suffix,parameter-unpacking,oct-method,old-raise-syntax,backtick,import-star-module-level, - no-absolute-import,suppressed-message,nonzero-method,raw_input-builtin,reload-builtin,apply-builtin,using-cmp-argument, - next-method-called,raising-string,execfile-builtin,file-builtin,cmp-builtin,useless-suppression,getslice-method, - metaclass-assignment,cmp-method,round-builtin,dict-view-method,input-builtin,print-statement,indexing-exception, - unpacking-in-except,delslice-method,standarderror-builtin,coerce-builtin,filter-builtin-not-iterating, - map-builtin-not-iterating,old-ne-operator,long-builtin,intern-builtin,zip-builtin-not-iterating,reduce-builtin, - unicode-builtin,old-division,xrange-builtin,old-octal-literal,coerce-method, - too-few-public-methods,too-many-arguments,too-many-instance-attributes,bad-builtin,too-many-ancestors, - too-few-format-args,fixme,duplicate-code,deprecated-lambda,cyclic-import,useless-object-inheritance, - inconsistent-return-statements,unnecessary-pass, - I +# Regular expression matching correct attribute names. Overrides attr-naming- +# style. If left empty, attribute names will be checked with the set naming +# style. +#attr-rgx= -[REPORTS] +# Bad variable names which should always be refused, separated by a comma. +bad-names=foo, + bar, + baz, + toto, + tutu, + tata -# Set the output format. Available formats are text, parseable, colorized, msvs -# (visual studio) and html. You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=colorized +# Bad variable names regexes, separated by a comma. If names match any regex, +# they will always be refused +bad-names-rgxs= -# Put messages in a separate file for each module / package specified on the -# command line instead of printing them on stdout. Reports (if any) will be -# written in a file name "pylint_global.[txt|html]". -files-output=no +# Naming style matching correct class attribute names. +class-attribute-naming-style=any -# Tells whether to display a full report or only the messages -reports=no +# Regular expression matching correct class attribute names. Overrides class- +# attribute-naming-style. If left empty, class attribute names will be checked +# with the set naming style. +#class-attribute-rgx= -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) +# Naming style matching correct class constant names. +class-const-naming-style=UPPER_CASE -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details -#msg-template= +# Regular expression matching correct class constant names. Overrides class- +# const-naming-style. If left empty, class constant names will be checked with +# the set naming style. +#class-const-rgx= +# Naming style matching correct class names. +class-naming-style=PascalCase -[FORMAT] +# Regular expression matching correct class names. Overrides class-naming- +# style. If left empty, class names will be checked with the set naming style. +#class-rgx= -# Maximum number of characters on a single line. -max-line-length=120 +# Naming style matching correct constant names. +const-naming-style=UPPER_CASE -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ +# Regular expression matching correct constant names. Overrides const-naming- +# style. If left empty, constant names will be checked with the set naming +# style. +#const-rgx= -# 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 +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator +# Naming style matching correct function names. +function-naming-style=snake_case -# Maximum number of lines in a module -max-module-lines=1000 +# Regular expression matching correct function names. Overrides function- +# naming-style. If left empty, function names will be checked with the set +# naming style. +#function-rgx= -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' +# Good variable names which should always be accepted, separated by a comma. +good-names=i, + j, + k, + ex, + Run, + _ -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 +# Good variable names regexes, separated by a comma. If names match any regex, +# they will always be accepted +good-names-rgxs= -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -expected-line-ending-format= +# Include a hint for the correct naming format with invalid-name. +include-naming-hint=no +# Naming style matching correct inline iteration names. +inlinevar-naming-style=any -[TYPECHECK] +# Regular expression matching correct inline iteration names. Overrides +# inlinevar-naming-style. If left empty, inline iteration names will be checked +# with the set naming style. +#inlinevar-rgx= -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes +# Naming style matching correct method names. +method-naming-style=snake_case -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis. It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules= +# Regular expression matching correct method names. Overrides method-naming- +# style. If left empty, method names will be checked with the set naming style. +#method-rgx= -# List of classes names for which member attributes should not be checked -# (useful for classes with attributes dynamically set). This supports can work -# with qualified names. -ignored-classes= +# Naming style matching correct module names. +module-naming-style=snake_case -# 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= +# Regular expression matching correct module names. Overrides module-naming- +# style. If left empty, module names will be checked with the set naming style. +#module-rgx= +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= -[BASIC] +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ -# List of builtins function names that should not be used, separated by a comma -bad-functions=map,filter +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +# These decorators are taken in consideration only for invalid-name. +property-classes=abc.abstractproperty -# Good variable names which should always be accepted, separated by a comma -good-names=i,j,k,ex,Run,_ +# Regular expression matching correct type variable names. If left empty, type +# variable names will be checked with the set naming style. +#typevar-rgx= -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata +# Naming style matching correct variable names. +variable-naming-style=snake_case -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= +# Regular expression matching correct variable names. Overrides variable- +# naming-style. If left empty, variable names will be checked with the set +# naming style. +#variable-rgx= -# Include a hint for the correct naming format with invalid-name -include-naming-hint=no -# Regular expression matching correct constant names -const-rgx=(([a-z_][a-z0-9_]*)|([A-Z_][A-Z0-9_]*)|(__.*__))$ +[CLASSES] -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ +# Warn about protected attribute access inside special methods +check-protected-access-in-special-methods=no -# Regular expression matching correct class names -class-rgx=[A-Z_][a-zA-Z0-9]+$ +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__, + __new__, + setUp, + __post_init__ -# Naming hint for class names -class-name-hint=[A-Z_][a-zA-Z0-9]+$ +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict, + _fields, + _replace, + _source, + _make -# Regular expression matching correct class attribute names -class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs -# Regular expression matching correct argument names -argument-rgx=[a-z_][a-z0-9_]{2,30}$ -# Naming hint for argument names -argument-name-hint=[a-z_][a-z0-9_]{2,30}$ +[DESIGN] -# Regular expression matching correct function names -function-rgx=[a-z_][a-z0-9_]{2,30}$ +# List of regular expressions of class ancestor names to ignore when counting +# public methods (see R0903) +exclude-too-few-public-methods= -# Naming hint for function names -function-name-hint=[a-z_][a-z0-9_]{2,30}$ +# List of qualified class names to ignore when counting class parents (see +# R0901) +ignored-parents= -# Regular expression matching correct variable names -variable-rgx=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of arguments for function / method. +max-args=5 -# Naming hint for variable names -variable-name-hint=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of attributes for a class (see R0902). +max-attributes=7 -# Regular expression matching correct method names -method-rgx=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of boolean expressions in an if statement (see R0916). +max-bool-expr=5 -# Naming hint for method names -method-name-hint=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of branch for function / method body. +max-branches=12 -# Regular expression matching correct attribute names -attr-rgx=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of locals for function / method body. +max-locals=15 -# Naming hint for attribute names -attr-name-hint=[a-z_][a-z0-9_]{2,30}$ +# Maximum number of parents for a class (see R0901). +max-parents=7 -# Regular expression matching correct inline iteration names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ +# Maximum number of return / yield for function / method body. +max-returns=6 -# Regular expression matching correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ +# Maximum number of statements in function / method body. +max-statements=50 -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 +[EXCEPTIONS] +# Exceptions that will emit a warning when caught. +overgeneral-exceptions=builtins.BaseException,builtins.Exception -[ELIF] -# Maximum number of nested blocks for function / method body -max-nested-blocks=6 +[FORMAT] +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= -[SPELLING] +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ -# Spelling dictionary name. Available dictionaries: none. To make it working -# install python-enchant package. -spelling-dict= +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 -# List of comma separated words that should not be checked. -spelling-ignore-words= +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' -# A path to a file that contains private dictionary; one word per line. -spelling-private-dict-file= +# Maximum number of characters on a single line. +max-line-length=120 -# Tells whether to store unknown words to indicated private dictionary in -# --spelling-private-dict-file option instead of raising a message. -spelling-store-unknown-words=no +# 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 -[VARIABLES] +# 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 -# Tells whether we should check for unused import in __init__ files. -init-import=no -# A regular expression matching the name of dummy variables (i.e. expectedly -# not used). -dummy-variables-rgx=_$|dummy +[IMPORTS] + +# List of modules that can be imported at any level, not just the top level +# one. +allow-any-import-level= -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= +# Allow explicit reexports by alias from a package __init__. +allow-reexport-from-package=no -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_,_cb +# 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= [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 +# function parameter format. logging-modules=logging +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, +# UNDEFINED. +confidence=HIGH, + CONTROL_FLOW, + INFERENCE, + INFERENCE_FAILURE, + UNDEFINED + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once). You can also use "--disable=all" to +# disable everything first and then re-enable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use "--disable=all --enable=classes +# --disable=W". +disable=raw-checker-failed, + bad-inline-option, + locally-disabled, + file-ignored, + suppressed-message, + useless-suppression, + deprecated-pragma, + use-symbolic-message-instead, + inconsistent-return-statements, + too-few-public-methods, + too-many-arguments, + too-many-instance-attributes, + too-many-boolean-expressions + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable=c-extension-no-member + + +[METHOD_ARGS] + +# List of qualified names (i.e., library.method) which require a timeout +# parameter e.g. 'requests.api.get,requests.api.post' +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 + + +[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= + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=6 + +# 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 + + +[REPORTS] + +# Python expression which should return a score less than or equal to 10. You +# have access to the variables 'fatal', 'error', 'warning', 'refactor', +# 'convention', and 'info' which contain the number of messages in each +# category, as well as 'statement' which is the total number of statements +# analyzed. This score is used by the global evaluation report (RP0004). +evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details. +msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio). You can also give a reporter class, e.g. +# mypackage.mymodule.MyReporterClass. +#output-format= + +# Tells whether to display a full report or only the messages. +reports=no + +# Activate the evaluation score. +score=yes + + [SIMILARITIES] +# Comments are removed from the similarity computation +ignore-comments=yes + +# Docstrings are removed from the similarity computation +ignore-docstrings=yes + +# Imports are removed from the similarity computation +ignore-imports=yes + +# Signatures are removed from the similarity computation +ignore-signatures=yes + # Minimum lines number of a similarity. min-similarity-lines=4 -# Ignore comments when computing similarities. -ignore-comments=yes -# Ignore docstrings when computing similarities. -ignore-docstrings=yes +[SPELLING] -# Ignore imports when computing similarities. -ignore-imports=no +# Limits count of emitted suggestions for spelling mistakes. +max-spelling-suggestions=4 +# Spelling dictionary name. Available dictionaries: none. To make it work, +# install the 'python-enchant' package. +spelling-dict= -[MISCELLANEOUS] +# List of comma separated words that should be considered directives if they +# appear at the beginning of a comment and should not be checked. +spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy: -# List of note tags to take in consideration, separated by a comma. -notes=FIXME,XXX,TODO +# List of comma separated words that should not be checked. +spelling-ignore-words= +# A path to a file that contains the private dictionary; one word per line. +spelling-private-dict-file= -[DESIGN] +# 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 -# Maximum number of arguments for function / method -max-args=6 -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.* +[STRING] -# Maximum number of locals for function / method body -max-locals=15 +# 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 -# Maximum number of return / yield for function / method body -max-returns=6 +# 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 -# Maximum number of branch for function / method body -max-branches=12 -# Maximum number of statements in function / method body -max-statements=50 +[TYPECHECK] -# Maximum number of parents for a class (see R0901). -max-parents=7 +# 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 -# Maximum number of attributes for a class (see R0902). -max-attributes=7 +# 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= -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 +# Tells whether to warn about missing members when the owner of the attribute +# is inferred to be None. +ignore-none=yes -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 +# 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 -# Maximum number of boolean expressions in a if statement -max-bool-expr=6 +# 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 -[IMPORTS] +# 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 -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=optparse +# 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 -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= +# 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 -# Create a graph of external dependencies in 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 -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= +# List of decorators that change the signature of a decorated function. +signature-mutators= -[CLASSES] +[VARIABLES] -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid defining new builtins when possible. +additional-builtins= -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs +# List of names allowed to shadow builtins +allowed-redefined-builtins= -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict,_fields,_replace,_source,_make +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_, + _cb +# A regular expression matching the name of dummy variables (i.e. expected to +# not be used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ -[EXCEPTIONS] +# Argument names that match this expression will be ignored. +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io diff --git a/rebulk/builder.py b/rebulk/builder.py index 78cd242..5ae3ca2 100644 --- a/rebulk/builder.py +++ b/rebulk/builder.py @@ -50,7 +50,7 @@ def reset(self): :return: """ - self.__init__() + self.__init__() # pylint: disable=unnecessary-dunder-call def defaults(self, **kwargs): """ @@ -169,7 +169,7 @@ def build_chain(self, **kwargs): :return: :rtype: """ - from .chain import Chain # pylint:disable=import-outside-toplevel + from .chain import Chain # pylint:disable=import-outside-toplevel,cyclic-import with overrides(kwargs): set_defaults(self._chain_defaults, kwargs) @@ -191,7 +191,6 @@ def pattern(self, *pattern): :param pattern: :return: """ - pass def regex(self, *pattern, **kwargs): """ diff --git a/rebulk/chain.py b/rebulk/chain.py index 2e2a959..b3124d5 100644 --- a/rebulk/chain.py +++ b/rebulk/chain.py @@ -3,7 +3,6 @@ """ Chain patterns and handle repetiting capture group """ -# pylint: disable=super-init-not-called import itertools from .builder import Builder @@ -17,7 +16,6 @@ class _InvalidChainException(Exception): """ Internal exception raised when a chain is not valid """ - pass class Chain(Pattern, Builder): @@ -25,7 +23,7 @@ class Chain(Pattern, Builder): Definition of a pattern chain to search for. """ - def __init__(self, parent, chain_breaker=None, **kwargs): + def __init__(self, parent, chain_breaker=None, **kwargs): # pylint: disable=super-init-not-called Builder.__init__(self) call(Pattern.__init__, self, **kwargs) self._kwargs = kwargs @@ -259,7 +257,7 @@ def _truncate_repeater(self, matches, input_string): def _validate_repeater(self, matches): max_match_index = -1 if matches: - max_match_index = max([m.match_index for m in matches]) + max_match_index = max(m.match_index for m in matches) if max_match_index + 1 < self.repeater_start: raise _InvalidChainException diff --git a/rebulk/introspector.py b/rebulk/introspector.py index f4a4f70..d92334b 100644 --- a/rebulk/introspector.py +++ b/rebulk/introspector.py @@ -22,7 +22,6 @@ def properties(self): # pragma: no cover :return: all properties that described object can generate grouped by name. :rtype: dict """ - pass class PatternDescription(Description): diff --git a/rebulk/loose.py b/rebulk/loose.py index b66b370..47f8377 100644 --- a/rebulk/loose.py +++ b/rebulk/loose.py @@ -10,9 +10,9 @@ try: from inspect import getfullargspec as getargspec - _fullargspec_supported = True + _FULLARGSPEC_SUPPORTED = True except ImportError: - _fullargspec_supported = False + _FULLARGSPEC_SUPPORTED = False from inspect import getargspec from .utils import is_iterable @@ -120,7 +120,7 @@ def argspec_args(argspec, constructor, *args, **kwargs): return call_args, call_kwarg -if not _fullargspec_supported: +if not _FULLARGSPEC_SUPPORTED: def argspec_args_legacy(argspec, constructor, *args, **kwargs): """ Return (args, kwargs) matching the argspec object diff --git a/rebulk/match.py b/rebulk/match.py index 4dbf513..0893f8c 100644 --- a/rebulk/match.py +++ b/rebulk/match.py @@ -588,7 +588,7 @@ def _add_match(self, match): super()._add_match(match) -class Match(object): +class Match: """ Object storing values related to a single match """ diff --git a/rebulk/pattern.py b/rebulk/pattern.py index b7f2ea5..43a3073 100644 --- a/rebulk/pattern.py +++ b/rebulk/pattern.py @@ -35,7 +35,6 @@ def matches(self, input_string, context=None, with_raw_matches=False): :return: matches based on input_string for this pattern :rtype: iterator[Match] """ - pass class Pattern(BasePattern, metaclass=ABCMeta): @@ -338,7 +337,6 @@ def patterns(self): # pragma: no cover :return: A list of base patterns :rtype: list """ - pass @property def properties(self): @@ -360,7 +358,6 @@ def match_options(self): # pragma: no cover :return: **options to pass to Match constructor :rtype: dict """ - pass @abstractmethod def _match(self, pattern, input_string, context=None): # pragma: no cover @@ -375,7 +372,6 @@ def _match(self, pattern, input_string, context=None): # pragma: no cover :return: matches based on input_string for this pattern :rtype: iterator[Match] """ - pass def __repr__(self): defined = "" diff --git a/rebulk/processors.py b/rebulk/processors.py index 6a4f0ba..d48a1d6 100644 --- a/rebulk/processors.py +++ b/rebulk/processors.py @@ -44,7 +44,7 @@ class ConflictSolver(Rule): consequence = RemoveMatch @property - def default_conflict_solver(self): # pylint:disable=no-self-use + def default_conflict_solver(self): """ Default conflict solver to use. """ diff --git a/rebulk/rules.py b/rebulk/rules.py index d853b40..f972604 100644 --- a/rebulk/rules.py +++ b/rebulk/rules.py @@ -35,7 +35,6 @@ def then(self, matches, when_response, context): # pragma: no cover :return: True if the action was runned, False if it wasn't. :rtype: bool """ - pass class Condition(metaclass=ABCMeta): @@ -54,14 +53,13 @@ def when(self, matches, context): # pragma: no cover :return: truthy if rule should be triggered and execute then action, falsy if it should not. :rtype: object """ - pass class CustomRule(Condition, Consequence, metaclass=ABCMeta): """ Definition of a rule to apply """ - # pylint: disable=no-self-use, unused-argument, abstract-method + # pylint: disable=unused-argument, abstract-method priority = 0 name = None dependency = None diff --git a/rebulk/test/__init__.py b/rebulk/test/__init__.py index 0ab48c9..37dd07e 100644 --- a/rebulk/test/__init__.py +++ b/rebulk/test/__init__.py @@ -1,3 +1,3 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring +# pylint: disable=pointless-statement, missing-docstring diff --git a/rebulk/test/default_rules_module.py b/rebulk/test/default_rules_module.py index 065e161..690d9c3 100644 --- a/rebulk/test/default_rules_module.py +++ b/rebulk/test/default_rules_module.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name, len-as-condition from ..match import Match from ..rules import Rule, RemoveMatch, AppendMatch, RenameMatch, AppendTags, RemoveTags diff --git a/rebulk/test/rebulk_rules_module.py b/rebulk/test/rebulk_rules_module.py index 177e4a9..03706ca 100644 --- a/rebulk/test/rebulk_rules_module.py +++ b/rebulk/test/rebulk_rules_module.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name, len-as-condition from rebulk.rules import Rule, RemoveMatch, CustomRule diff --git a/rebulk/test/rules_module.py b/rebulk/test/rules_module.py index 8814a68..2e8f204 100644 --- a/rebulk/test/rules_module.py +++ b/rebulk/test/rules_module.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name, len-as-condition from ..match import Match from ..rules import Rule diff --git a/rebulk/test/test_chain.py b/rebulk/test/test_chain.py index f399554..7c1ee17 100644 --- a/rebulk/test/test_chain.py +++ b/rebulk/test/test_chain.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, no-member, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, no-member, len-as-condition, cyclic-import import re from functools import partial diff --git a/rebulk/test/test_debug.py b/rebulk/test/test_debug.py index 8abdac5..e205e7b 100644 --- a/rebulk/test/test_debug.py +++ b/rebulk/test/test_debug.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, protected-access, invalid-name, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, protected-access, invalid-name, len-as-condition from .default_rules_module import RuleRemove0 from .. import debug @@ -9,7 +9,7 @@ from ..rebulk import Rebulk -class TestDebug(object): +class TestDebug: # request.addfinalizer(disable_debug) debug.DEBUG = True @@ -57,9 +57,6 @@ def test_rule(self): assert repr(self.rule).startswith(' 0 assert self.rebulk._patterns[0].defined_at.name == 'rebulk.test.test_debug' assert self.rebulk._patterns[0].defined_at.filename.endswith('test_debug.py') @@ -72,8 +69,8 @@ def test_rebulk(self): assert str(self.rebulk._patterns[1].defined_at).startswith('test_debug.py#L') - assert self.matches[0].defined_at == self.rebulk._patterns[0].defined_at - assert self.matches[1].defined_at == self.rebulk._patterns[1].defined_at + assert self.matches[0].defined_at == self.rebulk._patterns[0].defined_at # pylint: disable=no-member + assert self.matches[1].defined_at == self.rebulk._patterns[1].defined_at # pylint: disable=no-member def test_repr(self): str(self.matches) diff --git a/rebulk/test/test_introspector.py b/rebulk/test/test_introspector.py index d83360f..cb07119 100644 --- a/rebulk/test/test_introspector.py +++ b/rebulk/test/test_introspector.py @@ -3,7 +3,7 @@ """ Introspector tests """ -# pylint: disable=no-self-use,pointless-statement,missing-docstring,protected-access,invalid-name,len-as-condition +# pylint: disable=pointless-statement,missing-docstring,protected-access,invalid-name,len-as-condition from ..rebulk import Rebulk from .. import introspector from .default_rules_module import RuleAppend2, RuleAppend3 diff --git a/rebulk/test/test_loose.py b/rebulk/test/test_loose.py index d54e6bc..10c2a28 100644 --- a/rebulk/test/test_loose.py +++ b/rebulk/test/test_loose.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name, len-as-condition from ..loose import call @@ -35,7 +35,7 @@ def func(v1, v2, **kwargs): def test_loose_class(): - class Dummy(object): + class Dummy: def __init__(self, v1, v2, v3=3, v4=4): self.v1 = v1 self.v2 = v2 @@ -53,7 +53,7 @@ def call(self): def test_loose_varargs_class(): - class Dummy(object): + class Dummy: def __init__(self, v1, v2, *args): self.v1 = v1 self.v2 = v2 @@ -69,7 +69,7 @@ def call(self): def test_loose_kwargs_class(): - class Dummy(object): + class Dummy: def __init__(self, v1, v2, **kwargs): self.v1 = v1 self.v2 = v2 diff --git a/rebulk/test/test_match.py b/rebulk/test/test_match.py index 2359149..be03615 100644 --- a/rebulk/test/test_match.py +++ b/rebulk/test/test_match.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, unneeded-not, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, unneeded-not, len-as-condition import pytest @@ -9,7 +9,7 @@ from ..formatters import formatters -class TestMatchClass(object): +class TestMatchClass: def test_repr(self): match1 = Match(1, 3, value="es") @@ -91,7 +91,7 @@ def test_value(self): assert match1.value == "test" -class TestMatchesClass(object): +class TestMatchesClass: match1 = Match(0, 2, value="te", name="start") match2 = Match(2, 3, value="s", tags="tag1") match3 = Match(3, 4, value="t", tags=["tag1", "tag2"]) @@ -298,7 +298,7 @@ def test_split(self): assert [split.value for split in splitted] == ["word1", "word2", "word3"] -class TestMaches(object): +class TestMaches: def test_names(self): input_string = "One Two Three" diff --git a/rebulk/test/test_pattern.py b/rebulk/test/test_pattern.py index b80b034..f40ad64 100644 --- a/rebulk/test/test_pattern.py +++ b/rebulk/test/test_pattern.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, unbalanced-tuple-unpacking, len-as-condition, no-member +# pylint: disable=pointless-statement, missing-docstring, unbalanced-tuple-unpacking, len-as-condition, no-member import re import pytest @@ -8,7 +8,7 @@ from ..pattern import StringPattern, RePattern, FunctionalPattern, REGEX_ENABLED from ..match import Match -class TestStringPattern(object): +class TestStringPattern: """ Tests for StringPattern matching """ @@ -110,7 +110,7 @@ def post_processor(matches, pattern): assert len(matches) == 0 -class TestRePattern(object): +class TestRePattern: """ Tests for RePattern matching """ @@ -418,7 +418,7 @@ def test_matches_kwargs(self): assert children[1].value == "HE" -class TestFunctionalPattern(object): +class TestFunctionalPattern: """ Tests for FunctionalPattern matching """ @@ -580,7 +580,7 @@ def playing(input_string): assert matches[0].value == "PLAY" -class TestValue(object): +class TestValue: """ Tests for value option """ @@ -649,7 +649,7 @@ def test_dict_default_value(self): assert group2.value == "CHILD" -class TestFormatter(object): +class TestFormatter: """ Tests for formatter option """ @@ -741,7 +741,7 @@ def digit(input_string): assert matches[0].value == 1849 * 3 -class TestValidator(object): +class TestValidator: """ Tests for validator option """ diff --git a/rebulk/test/test_processors.py b/rebulk/test/test_processors.py index 69be20f..9fb1a7d 100644 --- a/rebulk/test/test_processors.py +++ b/rebulk/test/test_processors.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, no-member, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, no-member, len-as-condition from ..pattern import StringPattern, RePattern from ..processors import ConflictSolver diff --git a/rebulk/test/test_rebulk.py b/rebulk/test/test_rebulk.py index 281461b..69f50a9 100644 --- a/rebulk/test/test_rebulk.py +++ b/rebulk/test/test_rebulk.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, no-member, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, no-member, len-as-condition from ..rebulk import Rebulk from ..rules import Rule @@ -294,7 +294,7 @@ def then(self, matches, when_response, context): assert len(matches) == 0 -class TestMarkers(object): +class TestMarkers: def test_one_marker(self): class MarkerRule(Rule): def when(self, matches, context): @@ -398,7 +398,7 @@ def then(self, matches, when_response, context): assert not matches.markers -class TestUnicode(object): +class TestUnicode: def test_rebulk_simple(self): input_string = "敏捷的棕色狐狸跳過懶狗" @@ -422,7 +422,7 @@ def func(input_string): assert matches[2].value == "的" -class TestImmutable(object): +class TestImmutable: def test_starting(self): input_string = "The quick brown fox jumps over the lazy dog" matches = Rebulk().string("quick").string("over").string("fox").matches(input_string) diff --git a/rebulk/test/test_rules.py b/rebulk/test/test_rules.py index cd7c0dd..0bcd651 100644 --- a/rebulk/test/test_rules.py +++ b/rebulk/test/test_rules.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name, no-member, len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name, no-member, len-as-condition import pytest from rebulk.test.default_rules_module import RuleRemove0, RuleAppend0, RuleRename0, RuleAppend1, RuleRemove1, \ RuleRename1, RuleAppend2, RuleRename2, RuleAppend3, RuleRename3, RuleAppendTags0, RuleRemoveTags0, \ @@ -66,7 +66,7 @@ def test_rule_when(): assert matches[1] == Match(3, 4) -class TestDefaultRules(object): +class TestDefaultRules: def test_remove(self): rules = Rules(RuleRemove0) diff --git a/rebulk/test/test_toposort.py b/rebulk/test/test_toposort.py index 76ea603..5dd72fc 100644 --- a/rebulk/test/test_toposort.py +++ b/rebulk/test/test_toposort.py @@ -18,7 +18,7 @@ from ..toposort import toposort, toposort_flatten, CyclicDependency -class TestCase(object): +class TestCase: def test_simple(self): results = list(toposort({2: set([11]), 9: set([11, 8]), 10: set([11, 3]), 11: set([7, 5]), 8: set([7, 3])})) expected = [set([3, 5, 7]), set([8, 11]), set([2, 9, 10])] @@ -88,7 +88,7 @@ def test_input_not_modified_when_cycle_error(self): assert data == orig -class TestCaseAll(object): +class TestCaseAll: def test_sort_flatten(self): data = {2: set([11]), 9: set([11, 8]), diff --git a/rebulk/test/test_validators.py b/rebulk/test/test_validators.py index 863ec09..0c255ea 100644 --- a/rebulk/test/test_validators.py +++ b/rebulk/test/test_validators.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name,len-as-condition +# pylint: disable=pointless-statement, missing-docstring, invalid-name,len-as-condition from functools import partial diff --git a/rebulk/utils.py b/rebulk/utils.py index 29cfda1..2ad20f5 100644 --- a/rebulk/utils.py +++ b/rebulk/utils.py @@ -100,7 +100,7 @@ def extend_safe(target, source): target.append(elt) -class _Ref(object): +class _Ref: """ Reference for IdentitySet """ diff --git a/setup.py b/setup.py index 3596753..e0929a7 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import io import re + from setuptools import setup, find_packages with io.open('CHANGELOG.md', encoding='utf-8') as f: @@ -35,11 +36,11 @@ 'Operating System :: OS Independent', 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Software Development :: Libraries :: Python Modules' ], keywords='re regexp regular expression search pattern string match',