Write the star cache to disk, creating data/ dir if needed.
(cache: dict)
| 37 | |
| 38 | |
| 39 | def save_cache(cache: dict) -> None: |
| 40 | """Write the star cache to disk, creating data/ dir if needed.""" |
| 41 | DATA_DIR.mkdir(parents=True, exist_ok=True) |
| 42 | CACHE_FILE.write_text( |
| 43 | json.dumps(cache, indent=2, ensure_ascii=False) + "\n", |
| 44 | encoding="utf-8", |
| 45 | ) |
| 46 | |
| 47 | |
| 48 | def build_graphql_query(repos: Sequence[str]) -> str: |
no outgoing calls