Skip to content

Make Video (and Movie and Episode) a dataclass#1349

Draft
getzze wants to merge 3 commits into
Diaoul:mainfrom
getzze:video-use-attrs
Draft

Make Video (and Movie and Episode) a dataclass#1349
getzze wants to merge 3 commits into
Diaoul:mainfrom
getzze:video-use-attrs

Conversation

@getzze

@getzze getzze commented Mar 1, 2026

Copy link
Copy Markdown
Collaborator

First step of #1094

make Video a dataclass

use attrs on Subtitle

correct encoding since attrs.converter

coverage

add cattrs tests

remove hatch command

use a typed ensure_list

do not show private members

import outside TYPE_CHECKING for docs to compile without errors

make hearing_impaired and foreign_only kw_only=True

fix docs

use keyword to init Episode

make subtitle_id read-only because it is part of the hash

Subtitle.subtitle_id is read-only

change type of Video.subtitles from set to list

Make Subtitle a hashable frozen dataclass, with a mutable SubtitleContent instance as attribute

Subtitles is not an attrs dataclass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant