Skip to content

Commit 09ee988

Browse files
authored
Fix doc rendering of child dataclasses (#595)
1 parent abc9b10 commit 09ee988

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

docs/source/_templates/dataclass.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
.. autoclass:: {{ name }}
99
:members:
1010
:undoc-members: __init__
11+
:inherited-members:

examples/audio_decoding.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def play_audio(samples):
7676
# all streams start exactly at 0! This is not a bug in TorchCodec, this is a
7777
# property of the file that was defined when it was encoded.
7878
#
79-
# %%
8079
# Specifying a range
8180
# ------------------
8281
#

src/torchcodec/decoders/_core/_metadata.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
SPACES = " "
2323

2424

25-
# TODO-AUDIO: docs below are mostly for video streams, we should edit them and /
26-
# or make sure they're OK for audio streams as well. Not sure how to best handle
27-
# docs for such class hierarchy.
28-
# TODO very related, none of these common fields in this base class show up in
29-
# the docs right now.
3025
@dataclass
3126
class StreamMetadata:
3227
duration_seconds_from_header: Optional[float]
@@ -40,7 +35,7 @@ class StreamMetadata:
4035
codec: Optional[str]
4136
"""Codec (str or None)."""
4237
stream_index: int
43-
"""Index of the stream within the video (int)."""
38+
"""Index of the stream that this metadata refers to (int)."""
4439

4540
def __repr__(self):
4641
s = self.__class__.__name__ + ":\n"

0 commit comments

Comments
 (0)