Commit 731d48a6 authored by Philip Jenvey's avatar Philip Jenvey

update docstring per the extension package fix, refactor

parent ac9f2f3d
......@@ -1102,13 +1102,10 @@ class ExtensionFileLoader:
raise
def is_package(self, fullname):
"""Return False as an extension module can never be a package."""
"""Return if the extension module is a package."""
file_name = _path_split(self.path)[1]
for suffix in EXTENSION_SUFFIXES:
if file_name == '__init__' + suffix:
return True
else:
return False
return any(file_name == '__init__' + suffix
for suffix in EXTENSION_SUFFIXES)
def get_code(self, fullname):
"""Return None as an extension module cannot create a code object."""
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment