grpc_client/clients/_path_setup.py

12 lines
290 B
Python
Raw Permalink Normal View History

2026-02-03 13:36:52 +08:00
from pathlib import Path
import sys
def ensure_paths() -> None:
root = Path(__file__).resolve().parents[1]
generated = root / "generated"
for path in (root, generated):
path_str = str(path)
if path_str not in sys.path:
sys.path.insert(0, path_str)