diff --git a/tsmark/video_annotator.py b/tsmark/video_annotator.py index c803cb2..8938a04 100755 --- a/tsmark/video_annotator.py +++ b/tsmark/video_annotator.py @@ -434,7 +434,17 @@ class Marker: ) return value - return {"x0": None, "y0": None, "x1": None, "y1": None, "cx": None, "cy": None, "visible": 0, "type": None, "age": None} + return { + "x0": None, + "y0": None, + "x1": None, + "y1": None, + "cx": None, + "cy": None, + "visible": 0, + "type": None, + "age": None, + } def modify_point(self, position, x, y): """position: tl topleft, br bottomright, c center""" @@ -615,7 +625,7 @@ class World: if self.plugin: self.plugin(self) - def interpolate_points(self, point_index = None): + def interpolate_points(self, point_index=None): """types: key: user clicked / accepted frame interp: interpolated frame @@ -627,7 +637,7 @@ class World: point_index = self.point_index def i_point(x0=None, y0=None, x1=None, y1=None, t=None, visible=None, age=None): - return {"x0": x0, "y0": y0, "x1": x1, "y1": y1, "type": t, "visible": visible, "age"=age} + return {"x0": x0, "y0": y0, "x1": x1, "y1": y1, "type": t, "visible": visible, "age": age} def point2array(p): @@ -688,7 +698,7 @@ class World: # clicked points (not necessary, could determine at draw time!) for key in point_keys: self.points_interpolated[point_index][key]["type"] = "key" - age=0 + age = 0 for key in self.points_interpolated[point_index]: if self.points_interpolated[point_index][key]["type"] == "key": age = 0 @@ -881,7 +891,7 @@ class World: keys = list(self.points.keys()) for index in keys: # Remove empty dicts - if len(self.points[index])==0: + if len(self.points[index]) == 0: del self.points[index] continue self.point_index = index