Skip to content

Commit

Permalink
Apply pyupgrade 3.9 and EOL 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
daveisfera committed Nov 8, 2024
1 parent 4b6678d commit 619937b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# You can use PyPy versions in python-version.
# For example, pypy2 and pypy3
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
6 changes: 3 additions & 3 deletions m3u8/version_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from m3u8.version_matching_rules import VersionMatchingError, available_rules


def get_version(file_lines: List[str]):
def get_version(file_lines: list[str]):
for line in file_lines:
if line.startswith(protocol.ext_x_version):
version = line.split(":")[1]
Expand All @@ -15,7 +15,7 @@ def get_version(file_lines: List[str]):

def valid_in_all_rules(
line_number: int, line: str, version: float
) -> List[VersionMatchingError]:
) -> list[VersionMatchingError]:
errors = []
for rule in available_rules:
validator = rule(version, line_number, line)
Expand All @@ -26,7 +26,7 @@ def valid_in_all_rules(
return errors


def validate(file_lines: List[str]) -> List[VersionMatchingError]:
def validate(file_lines: list[str]) -> list[VersionMatchingError]:
found_version = get_version(file_lines)
if found_version is None:
return []
Expand Down
2 changes: 1 addition & 1 deletion m3u8/version_matching_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def validate(self):
return self.version >= 4


available_rules: List[Type[VersionMatchRuleBase]] = [
available_rules: list[type[VersionMatchRuleBase]] = [
ValidIVInEXTXKEY,
ValidFloatingPointEXTINF,
ValidEXTXBYTERANGEOrEXTXIFRAMESONLY,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
description="Python m3u8 parser",
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.7",
python_requires=">=3.9",
)

0 comments on commit 619937b

Please sign in to comment.