Concrete implementation of InspectLoader.is_package by checking if the path returned by get_filename has a filename of '__init__.py'.
(self, fullname)
| 728 | SourcelessFileLoader.""" |
| 729 | |
| 730 | def is_package(self, fullname): |
| 731 | """Concrete implementation of InspectLoader.is_package by checking if |
| 732 | the path returned by get_filename has a filename of '__init__.py'.""" |
| 733 | filename = _path_split(self.get_filename(fullname))[1] |
| 734 | filename_base = filename.rsplit('.', 1)[0] |
| 735 | tail_name = fullname.rpartition('.')[2] |
| 736 | return filename_base == '__init__' and tail_name != '__init__' |
| 737 | |
| 738 | def create_module(self, spec): |
| 739 | """Use default semantics for module creation.""" |
no test coverage detected