mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-01 21:50:21 +08:00
Remove more Python 3.8 cruft (#13787)
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user