itholic commented on a change in pull request #35252:
URL: https://github.com/apache/spark/pull/35252#discussion_r794057777
##########
File path: python/pyspark/_typing.pyi
##########
@@ -17,17 +17,27 @@
# under the License.
from typing import Callable, Iterable, Sized, TypeVar, Union
-from typing_extensions import Protocol
+from typing_extensions import Literal, Protocol
+
+from numpy import int32, int64, float32, float64, ndarray
F = TypeVar("F", bound=Callable)
T_co = TypeVar("T_co", covariant=True)
PrimitiveType = Union[bool, float, int, str]
+NonUDFType = Literal[0]
+
class SupportsIAdd(Protocol):
def __iadd__(self, other: SupportsIAdd) -> SupportsIAdd: ...
class SupportsOrdering(Protocol):
- def __le__(self, other: SupportsOrdering) -> bool: ...
+ def __lt__(self, other: SupportsOrdering) -> bool: ...
class SizedIterable(Protocol, Sized, Iterable[T_co]): ...
+
+O = TypeVar("O", bound=SupportsOrdering)
Review comment:
Thanks for fixing!! Especially I confused for a while when it's used as
`List[0]`... It seems like the first elements of some list
Yeah, I know it's painful when changing the name, especially when the name
is only single character like this 😂
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]