Skip to content

Commit

Permalink
Updated pylintrc configuration to version 2.6.x (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Dec 5, 2020
1 parent a8661b7 commit a6711f7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
93 changes: 55 additions & 38 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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=


Expand All @@ -126,7 +127,6 @@ output-format=text
reports=no

# Activate the evaluation score.
# score=yes
score=no


Expand Down Expand Up @@ -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
Expand All @@ -245,15 +245,13 @@ 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.
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.
Expand All @@ -264,28 +262,29 @@ 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.
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.
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
Expand All @@ -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.
Expand All @@ -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

Expand All @@ -316,23 +318,20 @@ 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.
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.
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
Expand All @@ -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_]*))$


Expand All @@ -364,6 +362,9 @@ notes=FIXME,
XXX,
TODO

# Regular expression of note tags to take in consideration.
#notes-rgx=


[FORMAT]

Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions tests/resolver_helpers/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a6711f7

Please sign in to comment.