Skip to content

Commit 7d21cae

Browse files
authored
gh-101100: Fix sphinx warnings in Doc/library/locale.rst (#114425)
* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` * Remove `/` from signatures
1 parent e14930f commit 7d21cae

File tree

2 files changed

+48
-14
lines changed

2 files changed

+48
-14
lines changed

Doc/library/locale.rst

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ know all the specifics of each country where the software is executed.
1818

1919
.. index:: pair: module; _locale
2020

21-
The :mod:`locale` module is implemented on top of the :mod:`_locale` module,
21+
The :mod:`locale` module is implemented on top of the :mod:`!_locale` module,
2222
which in turn uses an ANSI C locale implementation if available.
2323

2424
The :mod:`locale` module defines the following exception and functions:
@@ -192,7 +192,13 @@ The :mod:`locale` module defines the following exception and functions:
192192
Get a format string for :func:`time.strftime` to represent time in the am/pm
193193
format.
194194

195-
.. data:: DAY_1 ... DAY_7
195+
.. data:: DAY_1
196+
DAY_2
197+
DAY_3
198+
DAY_4
199+
DAY_5
200+
DAY_6
201+
DAY_7
196202

197203
Get the name of the n-th day of the week.
198204

@@ -202,15 +208,43 @@ The :mod:`locale` module defines the following exception and functions:
202208
international convention (ISO 8601) that Monday is the first day of the
203209
week.
204210

205-
.. data:: ABDAY_1 ... ABDAY_7
211+
.. data:: ABDAY_1
212+
ABDAY_2
213+
ABDAY_3
214+
ABDAY_4
215+
ABDAY_5
216+
ABDAY_6
217+
ABDAY_7
206218

207219
Get the abbreviated name of the n-th day of the week.
208220

209-
.. data:: MON_1 ... MON_12
221+
.. data:: MON_1
222+
MON_2
223+
MON_3
224+
MON_4
225+
MON_5
226+
MON_6
227+
MON_7
228+
MON_8
229+
MON_9
230+
MON_10
231+
MON_11
232+
MON_12
210233

211234
Get the name of the n-th month.
212235

213-
.. data:: ABMON_1 ... ABMON_12
236+
.. data:: ABMON_1
237+
ABMON_2
238+
ABMON_3
239+
ABMON_4
240+
ABMON_5
241+
ABMON_6
242+
ABMON_7
243+
ABMON_8
244+
ABMON_9
245+
ABMON_10
246+
ABMON_11
247+
ABMON_12
214248

215249
Get the abbreviated name of the n-th month.
216250

@@ -229,14 +263,14 @@ The :mod:`locale` module defines the following exception and functions:
229263

230264
.. data:: NOEXPR
231265

232-
Get a regular expression that can be used with the regex(3) function to
266+
Get a regular expression that can be used with the ``regex(3)`` function to
233267
recognize a negative response to a yes/no question.
234268

235269
.. note::
236270

237271
The regular expressions for :const:`YESEXPR` and
238272
:const:`NOEXPR` use syntax suitable for the
239-
:c:func:`regex` function from the C library, which might
273+
``regex`` function from the C library, which might
240274
differ from the syntax used in :mod:`re`.
241275

242276
.. data:: CRNCYSTR
@@ -581,9 +615,9 @@ the locale is ``C``).
581615

582616
When Python code uses the :mod:`locale` module to change the locale, this also
583617
affects the embedding application. If the embedding application doesn't want
584-
this to happen, it should remove the :mod:`_locale` extension module (which does
618+
this to happen, it should remove the :mod:`!_locale` extension module (which does
585619
all the work) from the table of built-in modules in the :file:`config.c` file,
586-
and make sure that the :mod:`_locale` module is not accessible as a shared
620+
and make sure that the :mod:`!_locale` module is not accessible as a shared
587621
library.
588622

589623

@@ -597,17 +631,18 @@ Access to message catalogs
597631
.. function:: dcgettext(domain, msg, category)
598632
.. function:: textdomain(domain)
599633
.. function:: bindtextdomain(domain, dir)
634+
.. function:: bind_textdomain_codeset(domain, codeset)
600635

601636
The locale module exposes the C library's gettext interface on systems that
602-
provide this interface. It consists of the functions :func:`!gettext`,
603-
:func:`!dgettext`, :func:`!dcgettext`, :func:`!textdomain`, :func:`!bindtextdomain`,
604-
and :func:`!bind_textdomain_codeset`. These are similar to the same functions in
637+
provide this interface. It consists of the functions :func:`gettext`,
638+
:func:`dgettext`, :func:`dcgettext`, :func:`textdomain`, :func:`bindtextdomain`,
639+
and :func:`bind_textdomain_codeset`. These are similar to the same functions in
605640
the :mod:`gettext` module, but use the C library's binary format for message
606641
catalogs, and the C library's search algorithms for locating message catalogs.
607642

608643
Python applications should normally find no need to invoke these functions, and
609644
should use :mod:`gettext` instead. A known exception to this rule are
610645
applications that link with additional C libraries which internally invoke
611-
:c:func:`gettext` or :c:func:`dcgettext`. For these applications, it may be
646+
C functions ``gettext`` or ``dcgettext``. For these applications, it may be
612647
necessary to bind the text domain, so that the libraries can properly locate
613648
their message catalogs.

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ Doc/library/functools.rst
5050
Doc/library/http.cookiejar.rst
5151
Doc/library/http.server.rst
5252
Doc/library/importlib.rst
53-
Doc/library/locale.rst
5453
Doc/library/logging.config.rst
5554
Doc/library/logging.handlers.rst
5655
Doc/library/lzma.rst

0 commit comments

Comments
 (0)