Skip to content

Commit 415bbb7

Browse files
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
1 parent 6879a45 commit 415bbb7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
CACHE_VERSION: 3
12-
DEFAULT_PYTHON: 3.6
12+
DEFAULT_PYTHON: 3.8
1313
PRE_COMMIT_CACHE: ~/.cache/pre-commit
1414

1515
jobs:

astroid/interpreter/_import/spec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def _precache_zipimporters(path=None):
292292
req_paths = tuple(path or sys.path)
293293
cached_paths = tuple(pic)
294294
new_paths = _cached_set_diff(req_paths, cached_paths)
295+
# pylint: disable=no-member
295296
for entry_path in new_paths:
296297
try:
297298
pic[entry_path] = zipimport.zipimporter(entry_path)

astroid/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ def zip_import_data(self, filepath):
234234
except ValueError:
235235
continue
236236
try:
237+
# pylint: disable-next=no-member
237238
importer = zipimport.zipimporter(eggpath + ext)
238-
# pylint: enable=no-member
239239
zmodname = resource.replace(os.path.sep, ".")
240240
if importer.is_package(resource):
241241
zmodname = zmodname + ".__init__"

astroid/nodes/node_ng.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
from astroid import nodes
3434

3535
if sys.version_info >= (3, 6, 2):
36-
# To be fixed with https://github.com/PyCQA/pylint/pull/5316
37-
from typing import NoReturn # pylint: disable=unused-import
36+
from typing import NoReturn
3837
else:
3938
from typing_extensions import NoReturn
4039

@@ -445,7 +444,7 @@ def _fixed_source_line(self) -> Optional[int]:
445444
We need this method since not all nodes have :attr:`lineno` set.
446445
"""
447446
line = self.lineno
448-
_node: Optional[NodeNG] = self # pylint: disable = used-before-assignment
447+
_node: Optional[NodeNG] = self
449448
try:
450449
while line is None:
451450
_node = next(_node.get_children())

requirements_test_pre_commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black==21.7b0
2-
pylint==2.12.1
2+
pylint==2.12.2
33
isort==5.9.2
44
flake8==4.0.1
55
flake8-typing-imports==1.11.0

0 commit comments

Comments
 (0)