Accept PathLike in Sphinx.add_message_catalog()

This commit is contained in:
Adam Turner
2024-10-25 22:47:15 +01:00
parent 8cd599c50a
commit 116a430cac
4 changed files with 7 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ if TYPE_CHECKING:
def _init_console(
locale_dir: str | None = sphinx.locale._LOCALE_DIR,
locale_dir: str | os.PathLike[str] | None = sphinx.locale._LOCALE_DIR,
catalog: str = 'sphinx',
) -> tuple[gettext.NullTranslations, bool]:
"""Monkeypatch ``init_console`` to skip its action.