Skip to content

Commit

Permalink
Disable no-member for false positive with zipimport
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Dec 15, 2021
1 parent e940b61 commit 376f9b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 376f9b5

Please sign in to comment.