Skip to content

Commit ba4f979

Browse files
Disable no-member for false positive with zipimport
1 parent 865188e commit ba4f979

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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__"

0 commit comments

Comments
 (0)