Skip to content

docs: correct default cache_dir description in TLDExtract docstring#367

Open
SAY-5 wants to merge 1 commit into
john-kurkowski:masterfrom
SAY-5:docs-fix-default-cache-dir-docstring
Open

docs: correct default cache_dir description in TLDExtract docstring#367
SAY-5 wants to merge 1 commit into
john-kurkowski:masterfrom
SAY-5:docs-fix-default-cache-dir-docstring

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 24, 2026

The TLDExtract.__init__ docstring says "By default, the cache_dir will live in the tldextract directory." That is actually the fallback path. get_cache_dir() follows the XDG Base Directory standard first (e.g. $HOME/.cache/python-tldextract) and only uses the package directory (.suffix_cache) when no TLDEXTRACT_CACHE, XDG_CACHE_HOME, or HOME is available.

The README already documents the XDG default ("caches it indefinitely in $HOME/.cache/python-tldextract"), so this aligns the docstring with both the code and the README.

ruff check, ruff format --check, and import all pass on the changed file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant