Skip to content

Commit 613159b

Browse files
committed
Fix cache creation on Windows.
1 parent 013c706 commit 613159b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

seed_intersphinx_mapping/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Cache:
7272
def __init__(self, app_name: str):
7373
self.app_name: str = str(app_name)
7474
self.cache_dir = PathPlus(user_cache_dir(f"{self.app_name}_cache"))
75-
self.cache_dir.maybe_make()
75+
self.cache_dir.maybe_make(parents=True)
7676

7777
# Mapping of function names to their caches
7878
self.caches: Dict[str, Dict[str, Any]] = {}

seed_intersphinx_mapping/extension.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ def sphinx_seed_intersphinx_mapping(app: Sphinx, config: Config) -> None:
5353
:param config:
5454
"""
5555

56-
config.repository_root = repo_root = os.path.abspath(
57-
pathlib.Path(app.srcdir) / config.repository_root
58-
) # type: ignore
56+
repo_root = os.path.abspath(pathlib.Path(app.srcdir) / config.repository_root)
57+
config.repository_root = repo_root # type: ignore
5958

6059
if config.pkg_requirements_source == "requirements":
6160
for name, (uri, inv) in seed_intersphinx_mapping(repo_root).items():

0 commit comments

Comments
 (0)