Skip to content

Docs: Resolve Sphinx warnings in calendar.rst #108192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Doc/library/calendar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
used.


.. method:: formatmonthname(theyear, themonth, withyear=True)

Return an HTML table row for the month name given by year and month
*theyear* and *themonth*.
If *withyear* is ``True``, the year will be appended to the month name.
Used by :meth:`formatmonth`.


.. method:: formatyear(theyear, width=3)

Return a year's calendar as an HTML table. *width* (defaulting to 3)
Expand Down Expand Up @@ -341,7 +349,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is

.. note::

The constructor, :meth:`formatweekday` and :meth:`formatmonthname` methods
The constructor, :meth:`!formatweekday` and :meth:`!formatmonthname` methods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring valid warnings will only make us forget about the issue. We already have too many open and forgotten issues.

If the goal is to suppress warnings, just add the corresponding option to Sphinx invocation.

of these two classes temporarily change the ``LC_TIME`` locale to the given
*locale*. Because the current locale is a process-wide setting, they are
not thread-safe.
Expand Down Expand Up @@ -410,8 +418,8 @@ For simple text calendars this module provides the following functions.

.. function:: month(theyear, themonth, w=0, l=0)

Returns a month's calendar in a multi-line string using the :meth:`formatmonth`
of the :class:`TextCalendar` class.
Returns a month's calendar in a multi-line string using
:meth:`TextCalendar.formatmonth`.


.. function:: prcal(year, w=0, l=0, c=6, m=3)
Expand All @@ -422,7 +430,7 @@ For simple text calendars this module provides the following functions.
.. function:: calendar(year, w=2, l=1, c=6, m=3)

Returns a 3-column calendar for an entire year as a multi-line string using
the :meth:`formatyear` of the :class:`TextCalendar` class.
:meth:`TextCalendar.formatyear`.


.. function:: timegm(tuple)
Expand Down
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Doc/library/asyncio-task.rst
Doc/library/bdb.rst
Doc/library/bisect.rst
Doc/library/bz2.rst
Doc/library/calendar.rst
Doc/library/cmd.rst
Doc/library/codecs.rst
Doc/library/collections.abc.rst
Expand Down