You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect use of the :class: role with the "()" suffix #120345
There are several uses of the :class: role with the name followed by ().
Doc/tutorial/stdlib2.rst:296:The :mod:`array` module provides an :class:`~array.array()` object that is like
Doc/tutorial/stdlib2.rst:309:The :mod:`collections` module provides a :class:`~collections.deque()` object
Doc/whatsnew/2.5.rst:1727:calling into the interpreter's code. There's a :class:`py_object()` type
Doc/whatsnew/2.5.rst:1737:Don't forget to use :class:`py_object()`; if it's omitted you end up with a
Doc/whatsnew/3.12.rst:742:* Add :class:`itertools.batched()` for collecting into even-sized
Doc/howto/descriptor.rst:790:object returned by :class:`super()`.
Doc/library/datetime.rst:2156: This is called from the default :class:`datetime.astimezone()`
Doc/library/fileinput.rst:50:*openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The
Doc/library/collections.rst:102: Note, the iteration order of a :class:`ChainMap()` is determined by
This is incorrect. If we refer to a class as a type, we should not add () to the name. If we refer to it as a callable, we can use the :func: role instead (which adds () automatically). In one place :class: was improperly used for not a class at all.
Activity
pythongh-120345: Fix incorrect use of the :class: role with the "()" …
gh-120345: Fix incorrect use of the :class: role with the "()" suffix (…
pythongh-120345: Fix incorrect use of the :class: role with the "()" …
pythongh-120345: Fix incorrect use of the :class: role with the "()" …
[3.12] gh-120345: Fix incorrect use of the :class: role with the "()"…
[3.13] gh-120345: Fix incorrect use of the :class: role with the "()"…
hugovk commentedon Jun 12, 2024
Is this something that could be suggested for https://github.com/sphinx-contrib/sphinx-lint?
And can this issue be closed?
serhiy-storchaka commentedon Jun 12, 2024
Among more than 9000
:class:references there were only 9 with such kind of error. About 1 error in 2 years. And now they are fixed.If you add a check in the linter, it will run in vain two years before catching the next error.
pythongh-120345: Fix incorrect use of the :class: role with the "()" …
pythongh-120345: Fix incorrect use of the :class: role with the "()" …
pythongh-120345: Fix incorrect use of the :class: role with the "()" …