FIX: Coordinate.__new__(): return correct class instead of always Coordinate() (fucked up subclassing)
This commit is contained in:
parent
14d535911c
commit
9386c40ea5
@ -15,7 +15,7 @@ class DistanceAlgorithm(Enum):
|
|||||||
|
|
||||||
class Coordinate(tuple):
|
class Coordinate(tuple):
|
||||||
def __new__(cls, x: int, y: int, z: int = None) -> Coordinate:
|
def __new__(cls, x: int, y: int, z: int = None) -> Coordinate:
|
||||||
return tuple.__new__(Coordinate, (x, y, z))
|
return tuple.__new__(cls, (x, y, z))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def x(self):
|
def x(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user