diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 7859a693..a7c652db 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['31', '32', '33'] + version: ['32', '33'] container: image: registry.fedoraproject.org/fedora:${{ matrix.version }} steps: diff --git a/.pylintrc b/.pylintrc index a369a9f0..24c3d069 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,4 +1,4 @@ -# Pylint 2.4.x configuration file +# Pylint 2.6.x configuration file # # This file is generated by l2tdevtools update-dependencies.py, any dependency # related changes should be made in dependencies.ini. @@ -9,6 +9,9 @@ # run arbitrary code. extension-pkg-whitelist=pybde,pyewf,pyfsapfs,pyfsext,pyfshfs,pyfsntfs,pyfsxfs,pyfvde,pyfwnt,pyluksde,pyqcow,pysigscan,pysmdev,pysmraw,pytsk3,pyvhdi,pyvmdk,pyvshadow,pyvslvm +# Specify a score threshold to be exceeded before program exits with error. +fail-under=10.0 + # Add files or directories to the blacklist. They should be base names, not # paths. ignore=CVS @@ -37,9 +40,6 @@ load-plugins=pylint.extensions.docparams # Pickle collected data for later comparisons. persistent=yes -# Specify a configuration file. -#rcfile= - # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes @@ -79,7 +79,9 @@ disable=assignment-from-none, no-absolute-import, no-self-use, parameter-unpacking, + raise-missing-from, raw-checker-failed, + super-with-arguments, suppressed-message, too-few-public-methods, too-many-ancestors, @@ -100,7 +102,6 @@ disable=assignment-from-none, # 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 enable= @@ -126,7 +127,6 @@ output-format=text reports=no # Activate the evaluation score. -# score=yes score=no @@ -229,8 +229,8 @@ signature-mutators= [LOGGING] -# Format style used to check logging format string. `old` means using % -# formatting, `new` is for `{}` formatting,and `fstr` is for f-strings. +# 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 @@ -245,7 +245,6 @@ argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style. -#argument-rgx= argument-rgx=(([a-z][a-z0-9_]*)|(_[a-z0-9_]*))$ # Naming style matching correct attribute names. @@ -253,7 +252,6 @@ attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. -#attr-rgx= attr-rgx=(([a-z][a-z0-9_]*)|(_[a-z0-9_]*))$ # Bad variable names which should always be refused, separated by a comma. @@ -264,12 +262,15 @@ bad-names=foo, tutu, tata +# Bad variable names regexes, separated by a comma. If names match any regex, +# they will always be refused +bad-names-rgxs= + # Naming style matching correct class attribute names. class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. -#class-attribute-rgx= class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]*|(__.*__))$ # Naming style matching correct class names. @@ -277,7 +278,6 @@ class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming- # style. -#class-rgx= class-rgx=[A-Z_][a-zA-Z0-9]+$ # Naming style matching correct constant names. @@ -285,7 +285,6 @@ const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style. -#const-rgx= const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$ # Minimum line length for functions/classes that require docstrings, shorter @@ -297,7 +296,6 @@ function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style. -#function-rgx= function-rgx=[A-Z_][a-zA-Z0-9_]*$ # Good variable names which should always be accepted, separated by a comma. @@ -308,6 +306,10 @@ good-names=i, Run, _ +# Good variable names regexes, separated by a comma. If names match any regex, +# they will always be accepted +good-names-rgxs= + # Include a hint for the correct naming format with invalid-name. include-naming-hint=no @@ -316,7 +318,6 @@ inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. -#inlinevar-rgx= inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ # Naming style matching correct method names. @@ -324,7 +325,6 @@ method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style. -#method-rgx= method-rgx=(test|[A-Z_])[a-zA-Z0-9_]*$ # Naming style matching correct module names. @@ -332,7 +332,6 @@ module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. -#module-rgx= module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ # Colon-delimited sets of names that determine each other's naming style when @@ -353,7 +352,6 @@ variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style. -#variable-rgx= variable-rgx=(([a-z][a-z0-9_]*)|(_[a-z0-9_]*))$ @@ -364,6 +362,9 @@ notes=FIXME, XXX, TODO +# Regular expression of note tags to take in consideration. +#notes-rgx= + [FORMAT] @@ -378,23 +379,14 @@ indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). -# indent-string=' ' indent-string=' ' # Maximum number of characters on a single line. -# max-line-length=100 max-line-length=80 # Maximum number of lines in a module. max-module-lines=1000 -# 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 - # 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 @@ -409,13 +401,13 @@ single-line-if-stmt=no # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 -# Spelling dictionary name. Available dictionaries: en_NA (myspell), en_NZ -# (myspell), en_ZM (myspell), en_CA (myspell), en_GH (myspell), en_IN -# (myspell), en_TT (myspell), en_BS (myspell), en_DK (myspell), en_MW -# (myspell), en_ZW (myspell), en_BW (myspell), en_ZA (myspell), en_BZ -# (myspell), en_JM (myspell), en_US (myspell), en_PH (myspell), en_GB -# (myspell), en_SG (myspell), en_IE (myspell), en_HK (myspell), en_AU -# (myspell), en_AG (myspell), en_NG (myspell). +# Spelling dictionary name. Available dictionaries: en_AG (hunspell), en_AU +# (hunspell), en_BS (hunspell), en_BW (hunspell), en_BZ (hunspell), en_CA +# (hunspell), en_DK (hunspell), en_GB (hunspell), en_GH (hunspell), en_HK +# (hunspell), en_IE (hunspell), en_IN (hunspell), en_JM (hunspell), en_MW +# (hunspell), en_NA (hunspell), en_NG (hunspell), en_NZ (hunspell), en_PH +# (hunspell), en_SG (hunspell), en_TT (hunspell), en_US (hunspell), en_ZA +# (hunspell), en_ZM (hunspell), en_ZW (hunspell). spelling-dict= # List of comma separated words that should not be checked. @@ -446,16 +438,18 @@ min-similarity-lines=4 [STRING] -# This flag controls whether the implicit-str-concat-in-sequence should -# generate a warning on implicit string concatenation in sequences defined over -# several lines. +# 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 [DESIGN] # Maximum number of arguments for function / method. -# max-args=5 max-args=10 # Maximum number of attributes for a class (see R0902). @@ -549,6 +543,29 @@ known-third-party=enchant preferred-modules= +[PARAMETER_DOCUMENTATION] + +# Whether to accept totally missing parameter documentation in the docstring of +# a function that has parameters. +accept-no-param-doc=yes + +# Whether to accept totally missing raises documentation in the docstring of a +# function that raises an exception. +accept-no-raise-doc=yes + +# Whether to accept totally missing return documentation in the docstring of a +# function that returns a statement. +accept-no-return-doc=yes + +# Whether to accept totally missing yields documentation in the docstring of a +# generator. +accept-no-yields-doc=yes + +# If the docstring type cannot be guessed the specified docstring type will be +# used. +default-docstring-type=default + + [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to diff --git a/tests/resolver_helpers/test_lib.py b/tests/resolver_helpers/test_lib.py index 130213cd..59ccf2b0 100644 --- a/tests/resolver_helpers/test_lib.py +++ b/tests/resolver_helpers/test_lib.py @@ -17,10 +17,6 @@ class TestResolverHelper(resolver_helper.ResolverHelper): TYPE_INDICATOR = 'TEST' - def __init__(self, **kwargs): - """Initializes the test resolver helper.""" - super(TestResolverHelper, self).__init__(parent=None, **kwargs) - def NewFileObject(self, resolver_context): """Creates a new file-like object. diff --git a/tox.ini b/tox.ini index 0df9996c..2223d180 100644 --- a/tox.ini +++ b/tox.ini @@ -44,7 +44,7 @@ setenv = deps = -rrequirements.txt -rtest_requirements.txt - pylint >= 2.4.0, < 2.5.0 + pylint >= 2.6.0, < 2.7.0 commands = pylint --version # Ignore setup.py for now due to: