Get the cache directory it is created if it does not exist.
()
| 73 | |
| 74 | |
| 75 | def get_ipython_cache_dir() -> str: |
| 76 | """Get the cache directory it is created if it does not exist.""" |
| 77 | xdgdir = get_xdg_cache_dir() |
| 78 | if xdgdir is None: |
| 79 | return get_ipython_dir() |
| 80 | ipdir = os.path.join(xdgdir, "ipython") |
| 81 | if not os.path.exists(ipdir) and _writable_dir(xdgdir): |
| 82 | ensure_dir_exists(ipdir) |
| 83 | elif not _writable_dir(xdgdir): |
| 84 | return get_ipython_dir() |
| 85 | |
| 86 | return ipdir |
| 87 | |
| 88 | |
| 89 | def get_ipython_package_dir() -> str: |
nothing calls this directly
no test coverage detected
searching dependent graphs…