From 57014d6a45672d76f6a58a9533ff998268525165 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 9 May 2022 21:16:34 +0200 Subject: Bump pylint to 2.13.9, update changelog --- CONTRIBUTORS.txt | 2 +- ChangeLog | 2 +- pylint/__pkginfo__.py | 2 +- pylint/checkers/utils.py | 2 +- pylint/lint/expand_modules.py | 6 +++--- pylint/lint/pylinter.py | 7 ++++--- tbump.toml | 2 +- tests/test_self.py | 8 ++++---- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index fd6f17968..42163d961 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -89,8 +89,8 @@ contributors: - Ville Skyttä - Matus Valo - Pierre-Yves David -- David Shea : invalid sequence and slice index - Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> +- David Shea : invalid sequence and slice index - Derek Gustafson - Cezar Elnazli : deprecated-method - Nicolas Chauvat diff --git a/ChangeLog b/ChangeLog index 12e3c5599..8c49493f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ Release date: TBA What's New in Pylint 2.13.9? ============================ -Release date: TBA +Release date: 2022-05-13 * Respect ignore configuration options with ``--recursive=y``. diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 9ac08af5a..91585ad9e 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -4,7 +4,7 @@ from typing import Tuple -__version__ = "2.13.8" +__version__ = "2.13.9" def get_numversion_from_version(v: str) -> Tuple: diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index 9cba6e057..5f00734e9 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -820,7 +820,7 @@ def uninferable_final_decorators( """ decorators = [] for decorator in getattr(node, "nodes", []): - import_nodes: tuple[nodes.Import | nodes.ImportFrom] | None = None + import_nodes = None # Get the `Import` node. The decorator is of the form: @module.name if isinstance(decorator, nodes.Attribute): diff --git a/pylint/lint/expand_modules.py b/pylint/lint/expand_modules.py index 07b92895a..302eea9fb 100644 --- a/pylint/lint/expand_modules.py +++ b/pylint/lint/expand_modules.py @@ -45,9 +45,9 @@ def _is_in_ignore_list_re(element: str, ignore_list_re: List[Pattern]) -> bool: def _is_ignored_file( element: str, - ignore_list: list[str], - ignore_list_re: list[Pattern[str]], - ignore_list_paths_re: list[Pattern[str]], + ignore_list, + ignore_list_re, + ignore_list_paths_re, ) -> bool: basename = os.path.basename(element) return ( diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index 878c1190e..a0218937d 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -251,6 +251,7 @@ class PyLinter( "type": "regexp_paths_csv", "metavar": "[,...]", "default": [], + "dest": "ignore_paths", "help": "Add files or directories matching the regex patterns to the " "ignore-list. The regex matches against paths and can be in " "Posix or Windows format.", @@ -1030,8 +1031,8 @@ class PyLinter( if _is_ignored_file( root, - self.config.ignore, - self.config.ignore_patterns, + self.config.black_list, + self.config.black_list_re, self.config.ignore_paths, ): skip_subtrees.append(root) @@ -1193,7 +1194,7 @@ class PyLinter( modules, self.config.black_list, self.config.black_list_re, - self._ignore_paths, + self.config.ignore_paths, ) for error in errors: message = modname = error["mod"] diff --git a/tbump.toml b/tbump.toml index 0bc188dd3..f9d6a7e56 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/PyCQA/pylint" [version] -current = "2.13.8" +current = "2.13.9" regex = ''' ^(?P0|[1-9]\d*) \. diff --git a/tests/test_self.py b/tests/test_self.py index 27b1e7bed..09011d91e 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -1323,7 +1323,7 @@ class TestRunTC: [ join(HERE, "regrtest_data", "directory"), "--recursive=y", - "--ignore-pattern=ignored_.*", + "--ignore-patterns=ignored_.*", ], code=0, ) @@ -1332,7 +1332,7 @@ class TestRunTC: [ join(HERE, "regrtest_data", "directory"), "--recursive=y", - "--ignore-pattern=failing.*", + "--ignore-patterns=failing.*", ], code=0, ) @@ -1347,7 +1347,7 @@ class TestRunTC: [ join(HERE, "regrtest_data", "directory"), "--recursive=y", - "--ignore-path=.*ignored.*", + "--ignore-paths=.*ignored.*", ], code=0, ) @@ -1356,7 +1356,7 @@ class TestRunTC: [ join(HERE, "regrtest_data", "directory"), "--recursive=y", - "--ignore-path=.*failing.*", + "--ignore-paths=.*failing.*", ], code=0, ) -- cgit v1.2.1