mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 10:52:31 +08:00
Remove more Python 3.8 cruft (#13787)
This commit is contained in:
+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