summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-15 18:26:02 +0100
committerGitHub <noreply@github.com>2021-12-15 18:26:02 +0100
commit415bbb70d7f0a0c96f3eb1853f913108cb016cd9 (patch)
tree5e961d362f5eb5cee52f818156586dd91b7483fc
parent6879a45f382ae396e88d16e75a7b13bbbd6309a2 (diff)
downloadastroid-git-415bbb70d7f0a0c96f3eb1853f913108cb016cd9.tar.gz
Upgrade pylint to 2.12.2 (#1297)
* Upgrade pylint to 2.12.2 * Default Python in the CI is now python 3.8 * Remove useless suppression for python 3.8 * Disable no-member for false positive with zipimport
-rw-r--r--.github/workflows/ci.yaml2
-rw-r--r--astroid/interpreter/_import/spec.py1
-rw-r--r--astroid/manager.py2
-rw-r--r--astroid/nodes/node_ng.py5
-rw-r--r--requirements_test_pre_commit.txt2
5 files changed, 6 insertions, 6 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index d3a0962d..a7700fb8 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -9,7 +9,7 @@ on:
env:
CACHE_VERSION: 3
- DEFAULT_PYTHON: 3.6
+ DEFAULT_PYTHON: 3.8
PRE_COMMIT_CACHE: ~/.cache/pre-commit
jobs:
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py
index aad9c51c..43f00153 100644
--- a/astroid/interpreter/_import/spec.py
+++ b/astroid/interpreter/_import/spec.py
@@ -292,6 +292,7 @@ def _precache_zipimporters(path=None):
req_paths = tuple(path or sys.path)
cached_paths = tuple(pic)
new_paths = _cached_set_diff(req_paths, cached_paths)
+ # pylint: disable=no-member
for entry_path in new_paths:
try:
pic[entry_path] = zipimport.zipimporter(entry_path)
diff --git a/astroid/manager.py b/astroid/manager.py
index 36740fc7..ed0c3154 100644
--- a/astroid/manager.py
+++ b/astroid/manager.py
@@ -234,8 +234,8 @@ class AstroidManager:
except ValueError:
continue
try:
+ # pylint: disable-next=no-member
importer = zipimport.zipimporter(eggpath + ext)
- # pylint: enable=no-member
zmodname = resource.replace(os.path.sep, ".")
if importer.is_package(resource):
zmodname = zmodname + ".__init__"
diff --git a/astroid/nodes/node_ng.py b/astroid/nodes/node_ng.py
index b871aa88..5eb6d198 100644
--- a/astroid/nodes/node_ng.py
+++ b/astroid/nodes/node_ng.py
@@ -33,8 +33,7 @@ if TYPE_CHECKING:
from astroid import nodes
if sys.version_info >= (3, 6, 2):
- # To be fixed with https://github.com/PyCQA/pylint/pull/5316
- from typing import NoReturn # pylint: disable=unused-import
+ from typing import NoReturn
else:
from typing_extensions import NoReturn
@@ -445,7 +444,7 @@ class NodeNG:
We need this method since not all nodes have :attr:`lineno` set.
"""
line = self.lineno
- _node: Optional[NodeNG] = self # pylint: disable = used-before-assignment
+ _node: Optional[NodeNG] = self
try:
while line is None:
_node = next(_node.get_children())
diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt
index c5ab3d58..b08f5bc5 100644
--- a/requirements_test_pre_commit.txt
+++ b/requirements_test_pre_commit.txt
@@ -1,5 +1,5 @@
black==21.7b0
-pylint==2.12.1
+pylint==2.12.2
isort==5.9.2
flake8==4.0.1
flake8-typing-imports==1.11.0