Load griffe lazily so parser helpers can be unit-tested without it.
()
| 26 | |
| 27 | |
| 28 | def load_griffe() -> Any: |
| 29 | """Load griffe lazily so parser helpers can be unit-tested without it.""" |
| 30 | global _griffe |
| 31 | if _griffe is None: |
| 32 | try: |
| 33 | import griffe as griffe_module |
| 34 | except ImportError: |
| 35 | print("Error: griffe not installed. Run: pip install griffe") |
| 36 | raise SystemExit(1) |
| 37 | _griffe = griffe_module |
| 38 | return _griffe |
| 39 | |
| 40 | |
| 41 | # Paths |
no outgoing calls
no test coverage detected
searching dependent graphs…