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
+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)