Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pylint to 2.12.2 #1297

Merged
merged 4 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
CACHE_VERSION: 3
DEFAULT_PYTHON: 3.6
DEFAULT_PYTHON: 3.8
PRE_COMMIT_CACHE: ~/.cache/pre-commit

jobs:
Expand Down
1 change: 1 addition & 0 deletions astroid/interpreter/_import/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion astroid/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def zip_import_data(self, filepath):
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__"
Expand Down
5 changes: 2 additions & 3 deletions astroid/nodes/node_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
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

Expand Down Expand Up @@ -445,7 +444,7 @@ def _fixed_source_line(self) -> Optional[int]:
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())
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_pre_commit.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down