Skip to content

Commit

Permalink
Use List from typing to make 3.8 and earlier happy
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera committed Nov 8, 2024
1 parent 2e3650a commit e84d6f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# license that can be found in the LICENSE file.
import decimal
import os
from typing import TypeVar
from typing import List, TypeVar

from m3u8.mixins import BasePathMixin, GroupedBasePathMixin
from m3u8.parser import format_date_time, parse
Expand Down Expand Up @@ -453,7 +453,7 @@ def _create_sub_directories(self, filename):
T = TypeVar("T")


class TagList(list[T]):
class TagList(List[T]):
def __str__(self):
output = [str(tag) for tag in self]
return "\n".join(output)
Expand Down Expand Up @@ -716,7 +716,7 @@ def base_uri(self, newbase_uri):
self.init_section.base_uri = newbase_uri


class SegmentList(list[Segment], GroupedBasePathMixin):
class SegmentList(List[Segment], GroupedBasePathMixin):
def dumps(self, timespec="milliseconds", infspec="auto"):
output = []
last_segment = None
Expand Down Expand Up @@ -831,7 +831,7 @@ def __str__(self):
return self.dumps(None)


class PartialSegmentList(list[PartialSegment], GroupedBasePathMixin):
class PartialSegmentList(List[PartialSegment], GroupedBasePathMixin):
def __str__(self):
output = [str(part) for part in self]
return "\n".join(output)
Expand Down Expand Up @@ -1314,7 +1314,7 @@ def __str__(self):
return self.dumps()


class RenditionReportList(list[RenditionReport], GroupedBasePathMixin):
class RenditionReportList(List[RenditionReport], GroupedBasePathMixin):
def __str__(self):
output = [str(report) for report in self]
return "\n".join(output)
Expand Down

0 comments on commit e84d6f3

Please sign in to comment.