Skip to content
Snippets Groups Projects
Commit 1518cd40 authored by Tilman Daab's avatar Tilman Daab Committed by Timo Birr
Browse files

Undo __future__ import for type annotations, which is incompatible with python 3.6

parent 04827d40
No related branches found
No related tags found
1 merge request!94Undo __future__ import for type annotations, which is incompatible with python 3.6
......@@ -13,7 +13,7 @@ MIN_LONG_CPP = -9223372036854775808
@dataclasses.dataclass
class Duration(AronDataclass):
microSeconds: np.int64 = MIN_LONG_CPP, # std::numeric_limits<long>::min()
microSeconds: np.int64 = MIN_LONG_CPP # std::numeric_limits<long>::min()
@staticmethod
def from_seconds(seconds: float) -> "Duration":
......
from __future__ import annotations
# Using classes in the type annotations of their own methods can be re-introduced once this import is compatible
# (>= python 3.7) or native support is ready
# from __future__ import annotations
#from __future__ import annotations
import dataclasses as dc
import numpy as np
......@@ -46,7 +49,7 @@ class FramedPose(AronDataclass):
pose: np.ndarray = dc.field(default_factory=lambda: np.eye(4, dtype=np.float32))
@classmethod
def with_type_check(cls, header: FrameID, pose: np.ndarray) -> FramedPose:
def with_type_check(cls, header: FrameID, pose: np.ndarray) -> 'FramedPose':
"""
Ensures that the data type of the pose array is correct; otherwise, there might be problems when reading
the memory from C++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment