Concrete implementation of InspectLoader.is_package by checking if the path returned by get_filename has a filename of '__init__.py'.
(self, fullname)
| 740 | SourcelessFileLoader.""" |
| 741 | |
| 742 | def is_package(self, fullname): |
| 743 | """Concrete implementation of InspectLoader.is_package by checking if |
| 744 | the path returned by get_filename has a filename of '__init__.py'.""" |
| 745 | filename = _path_split(self.get_filename(fullname))[1] |
| 746 | filename_base = filename.rsplit('.', 1)[0] |
| 747 | tail_name = fullname.rpartition('.')[2] |
| 748 | return filename_base == '__init__' and tail_name != '__init__' |
| 749 | |
| 750 | def create_module(self, spec): |
| 751 | """Use default semantics for module creation.""" |
no test coverage detected