Skip to content

Commit

Permalink
[uss_qualifier] Simplify collections (interuss#339)
Browse files Browse the repository at this point in the history
Simplify collections
  • Loading branch information
BenjaminPelletier authored Nov 14, 2023
1 parent 3b16511 commit 83f2d59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions monitoring/monitorlib/geotemporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,6 @@ def to_flight_planning_api(self) -> fp_api.Volume4D:


class Volume4DCollection(List[Volume4D]):
def __init__(self, iterator: Iterator[dict]):
parsed_values = [
v if isinstance(v, Volume4D) else ImplicitDict.parse(v, Volume4D)
for v in iterator
]
super(Volume4DCollection, self).__init__(parsed_values)

def __add__(self, other):
if isinstance(other, Volume4D):
full_list = []
Expand Down Expand Up @@ -407,11 +400,4 @@ def has_active_volume(self, time_ref: datetime) -> bool:


class Volume4DTemplateCollection(List[Volume4DTemplate]):
def __init__(self, iterator: Iterator[dict]):
parsed_values = [
v
if isinstance(v, Volume4DTemplate)
else ImplicitDict.parse(v, Volume4DTemplate)
for v in iterator
]
super(Volume4DTemplateCollection, self).__init__(parsed_values)
pass
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gevent==22.10.2 # mock_uss / gunicorn worker
google-auth==1.6.3
graphviz==0.20.1 # uss_qualifier
gunicorn==20.1.0
implicitdict==2.2.1
implicitdict==2.3.0
itsdangerous==2.0.1 # Version 2.1.0 is not compatible with flask 1.1.2.
Jinja2==3.0.3 # See https://github.com/interuss/dss/issues/745
jsonschema==4.17.3 # uss_qualifier
Expand Down

0 comments on commit 83f2d59

Please sign in to comment.