uninstall
Uninstall files managed by ttt
.
Functions⚓︎
get_cache_dir ⚓︎
get_cache_dir()
Application cache directory.
Source code in tui_typer_tutor/core/uninstall.py
@beartype
def get_cache_dir() -> Path:
"""Application cache directory."""
return Path(platformdirs.user_cache_dir(APP_NAME))
uninstall ⚓︎
uninstall()
Uninstall files managed by ttt
.
Source code in tui_typer_tutor/core/uninstall.py
@beartype
def uninstall() -> None:
"""Uninstall files managed by `ttt`."""
cache_dir = get_cache_dir()
if cache_dir.is_dir():
logger.warning('Removing cache directory', cache_dir=cache_dir)
for csv_file in cache_dir.glob('*.*'):
logger.debug('Removing', name=csv_file.name, content=csv_file.read_text())
shutil.rmtree(cache_dir)
logger.warning(
'All local files created by this tool have been removed. You can now pipx or pip uninstall this package',
)