mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use a module level constant as best practice (#10876)
This commit is contained in:
parent
3c73efadab
commit
6e113d4e90
@ -159,8 +159,11 @@ def setlocale(category: int, value: Union[str, Iterable[str], None] = None) -> N
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
_LOCALE_DIR = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
def init_console(
|
def init_console(
|
||||||
locale_dir: str = path.abspath(path.dirname(__file__)), # NoQA: B008
|
locale_dir: str = _LOCALE_DIR,
|
||||||
catalog: str = 'sphinx',
|
catalog: str = 'sphinx',
|
||||||
) -> Tuple[NullTranslations, bool]:
|
) -> Tuple[NullTranslations, bool]:
|
||||||
"""Initialize locale for console.
|
"""Initialize locale for console.
|
||||||
|
Loading…
Reference in New Issue
Block a user