Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Quansight_ragna /tests /test_importable.py
| import importlib | |
| from pathlib import Path | |
| HERE = Path(__file__).parent | |
| PROJECT_ROOT = HERE.parent | |
| PACKAGE_ROOT = PROJECT_ROOT / "ragna" | |
| def main(): | |
| for path in PACKAGE_ROOT.rglob("*.py"): | |
| path = path.parent if path.name == "__init__.py" else path.with_suffix("") | |
| path = path.relative_to(PROJECT_ROOT) | |
| if any(part.startswith("_") for part in path.parts): | |
| continue | |
| name = path.as_posix().replace("/", ".") | |
| try: | |
| importlib.import_module(name) | |
| except Exception as exc: | |
| raise ImportError( | |
| f"Trying to import '{name}' raise the error above" | |
| ) from exc | |
| else: | |
| print(name) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 745 Bytes
- Xet hash:
- 2400207e82288ad8ab93331b7e573a72e27230eca42d0edd8b7887d44105fd30
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.