mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-14 00:48:55 +08:00
Remove more Python 3.8 cruft (#13787)
This commit is contained in:
1 parent
1edf4e819a
commit
d92a6449c2
19 files changed
+63
-124
No files matched your search
+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