pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

ambiguous-call-to-overloaded-function-with-the-same-parameters-

Open rainforeast opened this issue 1 year ago • 1 comments

in \OCC\Core\V3d.pyi converthas the same parameter how can i use def Convert(self, Xp: int, Yp: int) -> Tuple[float, float, float]but not this one def Convert(self, Xp: int, Yp: int) -> Tuple[float, float]: ... @overload def Convert(self, Vp: int) -> float: ... @overload def Convert(self, Xp: int, Yp: int) -> Tuple[float, float]: ... @overload def Convert(self, Vv: float) -> int: ... @overload def Convert(self, Xv: float, Yv: float) -> Tuple[int, int]: ... @overload def Convert(self, Xp: int, Yp: int) -> Tuple[float, float, float]: ... @overload def Convert(self, X: float, Y: float, Z: float) -> Tuple[int, int]: ...

rainforeast avatar Dec 28 '23 16:12 rainforeast

The problem is not only with the method documentation, but with the wrapper it self. Function signatures are the same in python, thus one is shadowing the others.

Godd catch :+1:

tpaviot avatar Feb 22 '24 16:02 tpaviot