aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2022-11-16 11:17:32 +0100
committerThéo de la Hogue2022-11-16 11:17:32 +0100
commiteb5bf6508231d50f79090c43e7237cb9735eb7d8 (patch)
tree0c479dc90e47d72532f78d60770f0a82945084a0
parentf4b76491d9565f8af05a7b778c37699aeca1e1da (diff)
downloadargaze-eb5bf6508231d50f79090c43e7237cb9735eb7d8.zip
argaze-eb5bf6508231d50f79090c43e7237cb9735eb7d8.tar.gz
argaze-eb5bf6508231d50f79090c43e7237cb9735eb7d8.tar.bz2
argaze-eb5bf6508231d50f79090c43e7237cb9735eb7d8.tar.xz
Making append method to return self instance.
-rw-r--r--src/argaze/DataStructures.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/argaze/DataStructures.py b/src/argaze/DataStructures.py
index 08bcac9..0c1dd5e 100644
--- a/src/argaze/DataStructures.py
+++ b/src/argaze/DataStructures.py
@@ -52,12 +52,14 @@ class TimeStampedBuffer(collections.OrderedDict):
return json.dumps(self, default=vars)
- def append(self, timestamped_buffer: TimeStampedBufferType):
+ def append(self, timestamped_buffer: TimeStampedBufferType) -> TimeStampedBufferType:
"""Append a timestamped buffer."""
for ts, value in timestamped_buffer.items():
self[ts] = value
+ return self
+
def get_first(self) -> Tuple[TimeStampType, DataType]:
"""Easing access to first item."""