Skip to content

Commit b437f09

Browse files
committed
Add default arguments to locale.init_console()
1 parent 29e6ada commit b437f09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sphinx/locale/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import locale
55
from collections import UserString, defaultdict
66
from gettext import NullTranslations
7+
from os import path
78
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
89

910

@@ -160,7 +161,10 @@ def setlocale(category: int, value: Union[str, Iterable[str], None] = None) -> N
160161
pass
161162

162163

163-
def init_console(locale_dir: str, catalog: str) -> Tuple[NullTranslations, bool]:
164+
def init_console(
165+
locale_dir: str = path.abspath(path.dirname(__file__)),
166+
catalog: str = 'sphinx',
167+
) -> Tuple[NullTranslations, bool]:
164168
"""Initialize locale for console.
165169
166170
.. versionadded:: 1.8

0 commit comments

Comments
 (0)