From 4ea1fe798939560fef8b164fc4da8821444c5d88 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sun, 13 Oct 2024 19:59:47 +0200 Subject: [PATCH] DOC: switch default_role from 'any' to 'py:obj' --- doc/conf.py | 2 +- sounddevice.py | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 0c35fe9..2e3523e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -55,7 +55,7 @@ except Exception: today = '' -default_role = 'any' +default_role = 'py:obj' nitpicky = True diff --git a/sounddevice.py b/sounddevice.py index 0974289..28d31a9 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -742,8 +742,8 @@ def __init__(self, kind, samplerate=None, blocksize=None, device=None, `RawStream`, `RawInputStream` and `RawOutputStream` instead. This class has the same properties and methods as `Stream`, - except for `read_available`/:meth:`~Stream.read` and - `write_available`/:meth:`~Stream.write`. + except for `~Stream.read_available`/`~Stream.read()` and + `~Stream.write_available`/`~Stream.write()`. It can be created with the same parameters as `Stream`, except that there are three additional parameters @@ -1176,7 +1176,7 @@ def __init__(self, samplerate=None, blocksize=None, """PortAudio input stream (using buffer objects). This is the same as `InputStream`, except that the *callback* - function and :meth:`~RawStream.read` work on plain Python buffer + function and `~RawStream.read()` work on plain Python buffer objects instead of on NumPy arrays. NumPy is not necessary for using this. @@ -1234,7 +1234,7 @@ def read(self, frames): samples in the format specified by the *dtype* parameter used to open the stream, and the number of channels specified by *channels*. - See also `samplesize`. + See also `~Stream.samplesize`. overflowed : bool See `Stream.read()`. @@ -1262,7 +1262,7 @@ def __init__(self, samplerate=None, blocksize=None, """PortAudio output stream (using buffer objects). This is the same as `OutputStream`, except that the *callback* - function and :meth:`~RawStream.write` work on plain Python + function and `~RawStream.write()` work on plain Python buffer objects instead of on NumPy arrays. NumPy is not necessary for using this. @@ -1317,7 +1317,7 @@ def write(self, data): *channels*. The length of the buffer is not constrained to a specific range, however high performance applications will want to match this parameter to the *blocksize* parameter - used when opening the stream. See also `samplesize`. + used when opening the stream. See also `~Stream.samplesize`. Returns ------- @@ -1378,7 +1378,7 @@ def __init__(self, samplerate=None, blocksize=None, ``'uint8'``), this also supports ``'int24'``, i.e. packed 24 bit format. The default value can be changed with `default.dtype`. - See also `samplesize`. + See also `~Stream.samplesize`. callback : callable User-supplied function to consume, process or generate audio data in response to requests from an active stream. @@ -1413,7 +1413,7 @@ def __init__(self, samplerate=None, blocksize=None, """PortAudio input stream (using NumPy). This has the same methods and attributes as `Stream`, except - :meth:`~Stream.write` and `write_available`. + `~Stream.write()` and `~Stream.write_available`. Furthermore, the stream callback is expected to have a different signature (see below). @@ -1488,7 +1488,7 @@ def __init__(self, samplerate=None, blocksize=None, """PortAudio output stream (using NumPy). This has the same methods and attributes as `Stream`, except - :meth:`~Stream.read` and `read_available`. + `~Stream.read()` and `~Stream.read_available`. Furthermore, the stream callback is expected to have a different signature (see below). @@ -2110,7 +2110,7 @@ class default: See Also -------- - :func:`query_devices` + `query_devices()` """ channels = _default_channels = None, None @@ -2120,7 +2120,7 @@ class default: See Also -------- - :func:`query_devices` + `query_devices()` """ dtype = _default_dtype = 'float32', 'float32' @@ -2152,7 +2152,7 @@ class default: See Also -------- - :func:`query_devices` + `query_devices()` """ blocksize = _lib.paFramesPerBufferUnspecified @@ -2272,7 +2272,7 @@ class CallbackStop(Exception): See Also -------- - CallbackAbort, :meth:`Stream.stop`, Stream + CallbackAbort, `Stream.stop()`, Stream """ @@ -2285,7 +2285,7 @@ class CallbackAbort(Exception): See Also -------- - CallbackStop, :meth:`Stream.abort`, Stream + CallbackStop, `Stream.abort()`, Stream """