Check that all packages containing id have a __init__ file.
(fscache: FileSystemCache, id: str, path: str, prefix: str)
| 756 | |
| 757 | |
| 758 | def verify_module(fscache: FileSystemCache, id: str, path: str, prefix: str) -> bool: |
| 759 | """Check that all packages containing id have a __init__ file.""" |
| 760 | if is_init_file(path): |
| 761 | path = os.path.dirname(path) |
| 762 | for i in range(id.count(".")): |
| 763 | path = os.path.dirname(path) |
| 764 | if not any( |
| 765 | fscache.isfile_case(os_path_join(path, f"__init__{extension}"), prefix) |
| 766 | for extension in PYTHON_EXTENSIONS |
| 767 | ): |
| 768 | return False |
| 769 | return True |
| 770 | |
| 771 | |
| 772 | def highest_init_level(fscache: FileSystemCache, id: str, path: str, prefix: str) -> int: |
no test coverage detected
searching dependent graphs…