Closed JonathanPlasse closed 2 months ago
About this issue, should we need to add @typing.overload
?
It only necessary only for Vector
, as the argument type is different form the return type.
Matrix
and Quaternion
could use TypeVar
instead as they use the same type in argument and in the return type.
I would prefer using overload
everywhere as you would need to implement two different mechanisms (TypeVar
and overload
) where only one is needed (overload
).
https://docs.python.org/3/library/typing.html#typing.overload
This issue is fixed now.
Matrix
,Quaternion
, andVector
@
operation is incompatible withSequence[float]
. Only__matmul__
is needed__rmatmul__
and__imatmul__
can be removed.The following code is all the valid
@
operations.The code above pass Mypy and Pyright with the changes below.