Skip to content

Commit 13d27d6

Browse files
authored
Merge pull request python-trio#1091 from bengartner/sphinx-default-role
Refactor to default role obj
2 parents 1bdb085 + 62b7f8c commit 13d27d6

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
("py:exc", "Anything else"),
4040
]
4141
autodoc_inherit_docstrings = False
42+
default_role = "obj"
4243

4344
# XX hack the RTD theme until
4445
# https://github.com/rtfd/sphinx_rtd_theme/pull/382

docs/source/history.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Features
109109
also reexports all the stdlib :mod:`subprocess` exceptions and constants for
110110
convenience. (`#4 <https://github.com/python-trio/trio/issues/4>`__)
111111
- You can now create an unbounded :class:`CapacityLimiter` by initializing with
112-
:obj:`math.inf` (`#618 <https://github.com/python-trio/trio/issues/618>`__)
112+
`math.inf` (`#618 <https://github.com/python-trio/trio/issues/618>`__)
113113
- New :mod:`trio.hazmat` features to allow cleanly switching live coroutine
114114
objects between Trio and other coroutine runners. Frankly, we're not even
115115
sure this is a good idea, but we want to `try it out in trio-asyncio
@@ -238,7 +238,7 @@ Bugfixes
238238
- Prevent crashes when used with Sentry (raven-python). (`#599
239239
<https://github.com/python-trio/trio/issues/599>`__)
240240
- The nursery context manager was rewritten to avoid use of
241-
`@asynccontextmanager` and `@async_generator`. This reduces extraneous frames
241+
``@asynccontextmanager`` and ``@async_generator``. This reduces extraneous frames
242242
in exception traces and addresses bugs regarding `StopIteration` and
243243
`StopAsyncIteration` exceptions not propagating correctly. (`#612
244244
<https://github.com/python-trio/trio/issues/612>`__)

docs/source/reference-core.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ in Python there can only be one exception at a time.
706706
Trio's answer is that it raises a :exc:`MultiError` object. This is a
707707
special exception which encapsulates multiple exception objects –
708708
either regular exceptions or nested :exc:`MultiError`\s. To make these
709-
easier to work with, Trio installs a custom :obj:`sys.excepthook` that
709+
easier to work with, Trio installs a custom `sys.excepthook` that
710710
knows how to print nice tracebacks for unhandled :exc:`MultiError`\s,
711711
and it also provides some helpful utilities like
712712
:meth:`MultiError.catch`, which allows you to catch "part of" a

trio/_file_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def wrap_file(file):
181181
file: a :term:`file object`
182182
183183
Returns:
184-
An :term:`asynchronous file object` that wraps `file`
184+
An :term:`asynchronous file object` that wraps ``file``
185185
186186
Example::
187187

trio/_highlevel_open_tcp_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ async def open_tcp_stream(
210210
port (int): The port to connect to.
211211
happy_eyeballs_delay (float): How many seconds to wait for each
212212
connection attempt to succeed or fail before getting impatient and
213-
starting another one in parallel. Set to :obj:`math.inf` if you want
213+
starting another one in parallel. Set to `math.inf` if you want
214214
to limit to only one connection attempt at a time (like
215215
:func:`socket.create_connection`). Default: 0.3 (300 ms).
216216

trio/_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class SSLStream(Stream):
298298
raises :exc:`NeedHandshakeError`.
299299
300300
This also means that if you register a SNI callback using
301-
:obj:`~ssl.SSLContext.sni_callback`, then the first argument your callback
301+
`~ssl.SSLContext.sni_callback`, then the first argument your callback
302302
receives will be a :class:`ssl.SSLObject`.
303303
304304
"""

0 commit comments

Comments
 (0)