Skip to content

Commit 00afdd0

Browse files
committed
Fix a few symbol name errors
1 parent 44bad00 commit 00afdd0

7 files changed

Lines changed: 9 additions & 10 deletions

File tree

brainframe/api/bf_codecs/alarm_codecs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,3 @@ def from_dict(d):
114114
start_time=d["start_time"],
115115
end_time=d["end_time"],
116116
verified_as=d["verified_as"])
117-

brainframe/api/bf_codecs/condition_codecs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def from_dict(d: dict):
108108
with_attribute = None
109109
if d["with_attribute"] is not None:
110110
with_attribute = Attribute.from_dict(d["with_attribute"])
111-
test = ZoneAlarmCountCondition.TestType(d["test"])
111+
test = CountConditionTestType(d["test"])
112112

113113
return ZoneAlarmCountCondition(
114114
test=test,
@@ -210,13 +210,13 @@ def from_dict(d: dict):
210210
with_attribute = None
211211
if d["with_attribute"] is not None:
212212
with_attribute = Attribute.from_dict(d["with_attribute"])
213-
test = ZoneAlarmRateCondition.TestType(d["test"])
213+
test = RateConditionTestType(d["test"])
214214

215215
return ZoneAlarmRateCondition(
216216
test=test,
217217
duration=d["duration"],
218218
change=d["change"],
219-
direction=ZoneAlarmRateCondition.DirectionType(d["direction"]),
219+
direction=DirectionType(d["direction"]),
220220
with_class_name=d["with_class_name"],
221221
with_attribute=with_attribute,
222222
intersection_point=intersection_point,

brainframe/api/bf_codecs/license_codecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def from_dict(d: dict) -> "LicenseInfo":
8888
terms = LicenseTerms.from_dict(d["terms"])
8989

9090
return LicenseInfo(
91-
state=LicenseInfo.State(d["state"]),
91+
state=LicenseState(d["state"]),
9292
terms=terms,
9393
)
9494

brainframe/api/bf_codecs/plugin_codecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def to_dict(self):
149149

150150
@staticmethod
151151
def from_dict(d):
152-
size = NodeDescription.SizeType(d["size"])
152+
size = SizeType(d["size"])
153153
return NodeDescription(
154154
size=size,
155155
detections=d["detections"],

brainframe/api/bf_codecs/user_codecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ def from_dict(d: dict):
4949
return User(
5050
username=d["username"],
5151
password=d["password"],
52-
role=User.RoleType(d["role"]),
52+
role=RoleType(d["role"]),
5353
id_=d["id"],
5454
)

brainframe/api/stub.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
from requests.exceptions import ConnectionError, ReadTimeout
55

6-
from brainframe.api.bf_errors import UnauthorizedError, UnknownError
6+
from .bf_errors import UnauthorizedError, UnknownError
7+
from .bf_codecs import LicenseState
78
from . import stubs
89
from .stubs.base_stub import DEFAULT_TIMEOUT
910

@@ -62,7 +63,7 @@ def wait_for_server_initialization(self, timeout: int = None):
6263
# TODO: Remove this check and let the user know about the
6364
# license not being valid
6465
license_info = self.get_license_info()
65-
if license_info.state is license_info.State.VALID:
66+
if license_info.state is LicenseState.VALID:
6667
break
6768
except (ConnectionError, ConnectionRefusedError,
6869
UnauthorizedError, ReadTimeout):

brainframe/api/stubs/analysis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ def check_analyzing(self, stream_id,
3939
req = f"/api/streams/{stream_id}/analyze"
4040
resp, _ = self._get_json(req, timeout)
4141
return resp
42-

0 commit comments

Comments
 (0)