mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
importlib: SimplePath: __div__ -> __truediv__ on 3.10 (#8451)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
from typing import Any, Protocol, TypeVar
|
||||
|
||||
@@ -17,7 +16,7 @@ class SimplePath(Protocol):
|
||||
def joinpath(self) -> SimplePath: ...
|
||||
def parent(self) -> SimplePath: ...
|
||||
def read_text(self) -> str: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __truediv__(self) -> SimplePath: ...
|
||||
else:
|
||||
def __div__(self) -> SimplePath: ...
|
||||
# There was a bug in `SimplePath` definition in cpython, see #8451
|
||||
# Strictly speaking `__div__` was defined in 3.10, not __truediv__,
|
||||
# but it should have always been `__truediv__`.
|
||||
def __truediv__(self) -> SimplePath: ...
|
||||
|
||||
Reference in New Issue
Block a user