Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaCensi committed Nov 2, 2020
1 parent b2b7df9 commit ec6f722
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.6

WORKDIR /project

RUN pip3 install -U pip>=20.2
RUN pip3 install -U "pip>=20.2"
COPY requirements.* ./
RUN cat requirements.* > .requirements.txt
RUN pip3 install --use-feature=2020-resolver -r .requirements.txt
Expand Down
3 changes: 2 additions & 1 deletion src/duckietown_world/geo/placed_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def params_to_json_dict(self):

@dataclass
class PlacedObject(Serializable):
children: Dict[str, "PlacedObject"] = field(default_factory=dict)
children: "Dict[str, PlacedObject]" = field(default_factory=dict)
spatial_relations: Dict[str, SpatialRelation] = field(default_factory=dict)

def __post_init__(self):
Expand Down Expand Up @@ -98,6 +98,7 @@ def _simplecopy(self, *args, **kwargs):
children = dict((k, v) for k, v in self.children.items())
spatial_relations = dict((k, v) for k, v in self.spatial_relations.items())
kwargs.update(dict(children=children, spatial_relations=spatial_relations))
# noinspection PyArgumentList
return type(self)(*args, **kwargs)

def _copy(self):
Expand Down
6 changes: 5 additions & 1 deletion src/duckietown_world/seqs/tsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ def __iter__(self):
def from_iterator(cls, i: Iterator[X], T: Type[X] = object) -> "SampledSequence[X]":
timestamps = []
values = []
for t, v in i:
for x in i:
if len(x) != 2:
raise ZValueError(x=x)
t = x[0]
v = x[1]
assert isinstance(t, (float, int)), type(t)
t = Timestamp(t)
timestamps.append(t)
Expand Down

0 comments on commit ec6f722

Please sign in to comment.