aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/DataFeatures.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index 5019687..f336411 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -25,8 +25,8 @@ import matplotlib.pyplot as mpyplot
import matplotlib.patches as mpatches
from colorama import Style, Fore
-TimeStampType = TypeVar('TimeStamp', int, float)
-"""Type definition for timestamp as integer or float values."""
+TimestampType = TypeVar('TimeStamp', int, float)
+"""Type definition for timestamp as integer or float value."""
TimestampedObjectType = TypeVar('TimestampedObject', bound="TimestampedObject")
# Type definition for type annotation convenience
@@ -200,7 +200,7 @@ class TimestampedObjectsList(list):
super().append(ts_object)
- def look_for(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def look_for(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Look for object at given timestamp."""
for ts_object in self:
@@ -322,7 +322,7 @@ class TimestampedObjectsList(list):
"""String representation"""
return json.dumps([as_dict(ts_object) for ts_object in self], ensure_ascii=False,)
- def pop_last_until(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def pop_last_until(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Pop all item until a given timestamped value and return the first after."""
# get last item before given timestamp
@@ -334,7 +334,7 @@ class TimestampedObjectsList(list):
return self[0]
- def pop_last_before(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def pop_last_before(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Pop all item before a given timestamped value and return the last one."""
# get last item before given timestamp
@@ -348,7 +348,7 @@ class TimestampedObjectsList(list):
return poped_value
- def get_first_from(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def get_first_from(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Retreive first item timestamp from a given timestamp value."""
ts_list = self.timestamps()
@@ -362,7 +362,7 @@ class TimestampedObjectsList(list):
raise KeyError(f'No data stored after {timestamp} timestamp.')
- def get_last_before(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def get_last_before(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Retreive last item timestamp before a given timestamp value."""
ts_list = self.timestamps()
@@ -376,7 +376,7 @@ class TimestampedObjectsList(list):
raise KeyError(f'No data stored before {timestamp} timestamp.')
- def get_last_until(self, timestamp: TimeStampType) -> TimestampedObjectType:
+ def get_last_until(self, timestamp: TimestampType) -> TimestampedObjectType:
"""Retreive last item timestamp until a given timestamp value."""
ts_list = self.timestamps()