Before

…lines 1–11 unchanged (11 lines)
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with yle-dl. If not, see <https://www.gnu.org/licenses/>.
17
18from typing import List, Optional
19from datetime import datetime
20
21from dataclasses import dataclass
22from .streamflavor import StreamFlavor
23from .subtitles import Subtitle
24
25
26@dataclass(frozen=True)
27class AreenaApiProgramInfo:
28 media_id: str
29 title: str
30 episode_title: str
31 description: Optional[str]
32 flavors: List[StreamFlavor]
33 thumbnail: Optional[str]
34 subtitles: List[Subtitle]
35 duration_seconds: Optional[int]
36 available_at_region: str
37 publish_timestamp: Optional[datetime]
38 expiration_timestamp: Optional[datetime]
39 pending: bool
40 expired: bool
…lines 41–59 unchanged (19 lines)

After

…lines 1–11 unchanged (11 lines)
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with yle-dl. If not, see <https://www.gnu.org/licenses/>.
17
18from typing import Optional
19from datetime import datetime
20
21from dataclasses import dataclass
22from .streamflavor import StreamFlavor
23from .subtitles import Subtitle
24
25
26@dataclass(frozen=True)
27class AreenaApiProgramInfo:
28 media_id: str
29 title: str
30 episode_title: str
31 description: Optional[str]
32 flavors: list[StreamFlavor]
33 thumbnail: Optional[str]
34 subtitles: list[Subtitle]
35 duration_seconds: Optional[int]
36 available_at_region: str
37 publish_timestamp: Optional[datetime]
38 expiration_timestamp: Optional[datetime]
39 pending: bool
40 expired: bool
…lines 41–59 unchanged (19 lines)

Before

module
comment "# This file is part of yle-dl."
comment "#"
comment "# Copyright 2010-2025 Antti Ajanki and others"
comment "#"
comment "# Yle-dl is free software: you can redistribute it and/or mo"...
comment "# under the terms of the GNU General Public License as publi"...
comment "# the Free Software Foundation, either version 3 of the Lice"...
comment "# (at your option) any later version."
comment "#"
comment "# Yle-dl is distributed in the hope that it will be useful, "...
comment "# WITHOUT ANY WARRANTY; without even the implied warranty of"
comment "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t"...
comment "# General Public License for more details."
comment "#"
comment "# You should have received a copy of the GNU General Public "...
comment "# along with yle-dl. If not, see <https://www.gnu.org/licens"...
import_from_statement
from "from"
dotted_name
identifier "typing"
import "import"
dotted_name
identifier "List"
, ","
dotted_name
identifier "Optional"
import_from_statement
from "from"
dotted_name
identifier "datetime"
import "import"
dotted_name
identifier "datetime"
import_from_statement
from "from"
dotted_name
identifier "dataclasses"
import "import"
dotted_name
identifier "dataclass"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "streamflavor"
import "import"
dotted_name
identifier "StreamFlavor"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "subtitles"
import "import"
dotted_name
identifier "Subtitle"
decorated_definition
decorator
@ "@"
call
identifier "dataclass"
argument_list
( "("
keyword_argument
identifier "frozen"
= "="
true "True"
) ")"
class_definition
class "class"
identifier "AreenaApiProgramInfo"
: ":"
block
expression_statement
assignment
identifier "media_id"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "title"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "episode_title"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "description"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "str"
] "]"
expression_statement
assignment
identifier "flavors"
: ":"
type
generic_type
identifier "List"
type_parameter
[ "["
type
identifier "StreamFlavor"
] "]"
expression_statement
assignment
identifier "thumbnail"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "str"
] "]"
expression_statement
assignment
identifier "subtitles"
: ":"
type
generic_type
identifier "List"
type_parameter
[ "["
type
identifier "Subtitle"
] "]"
expression_statement
assignment
identifier "duration_seconds"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "int"
] "]"
expression_statement
assignment
identifier "available_at_region"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "publish_timestamp"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "datetime"
] "]"
expression_statement
assignment
identifier "expiration_timestamp"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "datetime"
] "]"
expression_statement
assignment
identifier "pending"
: ":"
type
identifier "bool"
expression_statement
assignment
identifier "expired"
: ":"
type
identifier "bool"
decorated_definition (+146 nodes collapsed)

After

module
comment "# This file is part of yle-dl."
comment "#"
comment "# Copyright 2010-2025 Antti Ajanki and others"
comment "#"
comment "# Yle-dl is free software: you can redistribute it and/or mo"...
comment "# under the terms of the GNU General Public License as publi"...
comment "# the Free Software Foundation, either version 3 of the Lice"...
comment "# (at your option) any later version."
comment "#"
comment "# Yle-dl is distributed in the hope that it will be useful, "...
comment "# WITHOUT ANY WARRANTY; without even the implied warranty of"
comment "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t"...
comment "# General Public License for more details."
comment "#"
comment "# You should have received a copy of the GNU General Public "...
comment "# along with yle-dl. If not, see <https://www.gnu.org/licens"...
import_from_statement
from "from"
dotted_name
identifier "typing"
import "import"
dotted_name
identifier "Optional"
import_from_statement
from "from"
dotted_name
identifier "datetime"
import "import"
dotted_name
identifier "datetime"
import_from_statement
from "from"
dotted_name
identifier "dataclasses"
import "import"
dotted_name
identifier "dataclass"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "streamflavor"
import "import"
dotted_name
identifier "StreamFlavor"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "subtitles"
import "import"
dotted_name
identifier "Subtitle"
decorated_definition
decorator
@ "@"
call
identifier "dataclass"
argument_list
( "("
keyword_argument
identifier "frozen"
= "="
true "True"
) ")"
class_definition
class "class"
identifier "AreenaApiProgramInfo"
: ":"
block
expression_statement
assignment
identifier "media_id"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "title"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "episode_title"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "description"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "str"
] "]"
expression_statement
assignment
identifier "flavors"
: ":"
type
generic_type
identifier "list"
type_parameter
[ "["
type
identifier "StreamFlavor"
] "]"
expression_statement
assignment
identifier "thumbnail"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "str"
] "]"
expression_statement
assignment
identifier "subtitles"
: ":"
type
generic_type
identifier "list"
type_parameter
[ "["
type
identifier "Subtitle"
] "]"
expression_statement
assignment
identifier "duration_seconds"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "int"
] "]"
expression_statement
assignment
identifier "available_at_region"
: ":"
type
identifier "str"
expression_statement
assignment
identifier "publish_timestamp"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "datetime"
] "]"
expression_statement
assignment
identifier "expiration_timestamp"
: ":"
type
generic_type
identifier "Optional"
type_parameter
[ "["
type
identifier "datetime"
] "]"
expression_statement
assignment
identifier "pending"
: ":"
type
identifier "bool"
expression_statement
assignment
identifier "expired"
: ":"
type
identifier "bool"
decorated_definition (+146 nodes collapsed)