Remove more Python 3.8 cruft (#13787)

This commit is contained in:
Alex Waygood
2025-04-03 11:56:38 +01:00
committed by GitHub
parent 1edf4e819a
commit d92a6449c2
19 changed files with 63 additions and 124 deletions
-2
View File
@@ -9,7 +9,6 @@ from __future__ import annotations
import os
import re
import sys
from pathlib import Path
from ts_utils.metadata import read_metadata
@@ -170,7 +169,6 @@ def check_requirement_pins() -> None:
if __name__ == "__main__":
assert sys.version_info >= (3, 9), "Python 3.9+ is required to run this test"
check_versions_file()
check_metadata()
check_requirement_pins()
+1 -2
View File
@@ -393,8 +393,7 @@ def stdlib_module_name_from_path(path: Path) -> str:
assert path.suffix == ".pyi"
parts = list(path.parts[1:-1])
if path.parts[-1] != "__init__.pyi":
# TODO: Python 3.9+: Use removesuffix.
parts.append(path.parts[-1][:-4])
parts.append(path.parts[-1].removesuffix(".pyi"))
return ".".join(parts)