diff --git a/src/neo4j/_spatial/__init__.py b/src/neo4j/_spatial/__init__.py index 0dd91ba75..61a521c60 100644 --- a/src/neo4j/_spatial/__init__.py +++ b/src/neo4j/_spatial/__init__.py @@ -60,7 +60,10 @@ def y(self) -> float: ... def z(self) -> float: ... def __new__(cls, iterable: t.Iterable[float]) -> Point: - return tuple.__new__(cls, map(float, iterable)) + # mypy issue https://github.com/python/mypy/issues/14890 + return tuple.__new__( # type: ignore[type-var] + cls, map(float, iterable) + ) def __repr__(self) -> str: return "POINT(%s)" % " ".join(map(str, self)) diff --git a/src/neo4j/time/__init__.py b/src/neo4j/time/__init__.py index faf8061c8..29fc4f725 100644 --- a/src/neo4j/time/__init__.py +++ b/src/neo4j/time/__init__.py @@ -415,7 +415,8 @@ def __new__( if not MIN_INT64 <= avg_total_seconds <= MAX_INT64: raise ValueError("Duration value out of range: %r", tuple.__repr__((mo, d, s, ns))) - return tuple.__new__(cls, (mo, d, s, ns)) + # mypy issue https://github.com/python/mypy/issues/14890 + return tuple.__new__(cls, (mo, d, s, ns)) # type: ignore[type-var] def __bool__(self) -> bool: """Falsy if all primary instance attributes are."""