FIX: Coordinate.__new__(): return correct class instead of always Coordinate() (fucked up subclassing)

This commit is contained in:
Stefan Harmuth 2023-12-23 09:44:36 +01:00
parent 14d535911c
commit 9386c40ea5

View File

@ -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):