Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e84d6f3

Browse files
committedNov 8, 2024·
Use List from typing to make 3.8 and earlier happy
1 parent 2e3650a commit e84d6f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎m3u8/model.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# license that can be found in the LICENSE file.
44
import decimal
55
import os
6-
from typing import TypeVar
6+
from typing import List, TypeVar
77

88
from m3u8.mixins import BasePathMixin, GroupedBasePathMixin
99
from m3u8.parser import format_date_time, parse
@@ -453,7 +453,7 @@ def _create_sub_directories(self, filename):
453453
T = TypeVar("T")
454454

455455

456-
class TagList(list[T]):
456+
class TagList(List[T]):
457457
def __str__(self):
458458
output = [str(tag) for tag in self]
459459
return "\n".join(output)
@@ -716,7 +716,7 @@ def base_uri(self, newbase_uri):
716716
self.init_section.base_uri = newbase_uri
717717

718718

719-
class SegmentList(list[Segment], GroupedBasePathMixin):
719+
class SegmentList(List[Segment], GroupedBasePathMixin):
720720
def dumps(self, timespec="milliseconds", infspec="auto"):
721721
output = []
722722
last_segment = None
@@ -831,7 +831,7 @@ def __str__(self):
831831
return self.dumps(None)
832832

833833

834-
class PartialSegmentList(list[PartialSegment], GroupedBasePathMixin):
834+
class PartialSegmentList(List[PartialSegment], GroupedBasePathMixin):
835835
def __str__(self):
836836
output = [str(part) for part in self]
837837
return "\n".join(output)
@@ -1314,7 +1314,7 @@ def __str__(self):
13141314
return self.dumps()
13151315

13161316

1317-
class RenditionReportList(list[RenditionReport], GroupedBasePathMixin):
1317+
class RenditionReportList(List[RenditionReport], GroupedBasePathMixin):
13181318
def __str__(self):
13191319
output = [str(report) for report in self]
13201320
return "\n".join(output)

0 commit comments

Comments
 (0)
Please sign in to comment.