(module, attr: str, only_modules)
| 153 | |
| 154 | |
| 155 | def is_importable(module, attr: str, only_modules) -> bool: |
| 156 | if only_modules: |
| 157 | try: |
| 158 | mod = getattr(module, attr) |
| 159 | except ModuleNotFoundError: |
| 160 | # See gh-14434 |
| 161 | return False |
| 162 | return inspect.ismodule(mod) |
| 163 | else: |
| 164 | return not(attr[:2] == '__' and attr[-2:] == '__') |
| 165 | |
| 166 | def is_possible_submodule(module, attr): |
| 167 | try: |
no outgoing calls
no test coverage detected
searching dependent graphs…