From 157f8e4179fbb345afb34b5827d4f8c7b15523c2 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Mon, 8 Apr 2024 16:48:16 +0200 Subject: [PATCH] Code review --- src/neptune/api/models.py | 8 ++++---- src/neptune/internal/backends/hosted_neptune_backend.py | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/neptune/api/models.py b/src/neptune/api/models.py index 8514cf281..8c0d1fd3c 100644 --- a/src/neptune/api/models.py +++ b/src/neptune/api/models.py @@ -292,7 +292,7 @@ def from_model(model: Any) -> FileSetField: class FloatSeriesField(Field, field_type=FieldType.FLOAT_SERIES): last: Optional[float] - def accept(self, visitor: "FieldVisitor[Ret]") -> Ret: + def accept(self, visitor: FieldVisitor[Ret]) -> Ret: return visitor.visit_float_series(self) @staticmethod @@ -309,7 +309,7 @@ def from_model(model: Any) -> FloatSeriesField: class StringSeriesField(Field, field_type=FieldType.STRING_SERIES): last: Optional[str] - def accept(self, visitor: "FieldVisitor[Ret]") -> Ret: + def accept(self, visitor: FieldVisitor[Ret]) -> Ret: return visitor.visit_string_series(self) @staticmethod @@ -326,7 +326,7 @@ def from_model(model: Any) -> StringSeriesField: class ImageSeriesField(Field, field_type=FieldType.IMAGE_SERIES): last_step: Optional[float] - def accept(self, visitor: "FieldVisitor[Ret]") -> Ret: + def accept(self, visitor: FieldVisitor[Ret]) -> Ret: return visitor.visit_image_series(self) @staticmethod @@ -343,7 +343,7 @@ def from_model(model: Any) -> ImageSeriesField: class StringSetField(Field, field_type=FieldType.STRING_SET): values: Set[str] - def accept(self, visitor: "FieldVisitor[Ret]") -> Ret: + def accept(self, visitor: FieldVisitor[Ret]) -> Ret: return visitor.visit_string_set(self) @staticmethod diff --git a/src/neptune/internal/backends/hosted_neptune_backend.py b/src/neptune/internal/backends/hosted_neptune_backend.py index 9f8974b87..4c416c798 100644 --- a/src/neptune/internal/backends/hosted_neptune_backend.py +++ b/src/neptune/internal/backends/hosted_neptune_backend.py @@ -165,15 +165,6 @@ FieldType.OBJECT_STATE.value, } -ATOMIC_ATTRIBUTE_TYPES = { - FieldType.INT.value, - FieldType.FLOAT.value, - FieldType.STRING.value, - FieldType.BOOL.value, - FieldType.DATETIME.value, - FieldType.OBJECT_STATE.value, -} - class HostedNeptuneBackend(NeptuneBackend): def __init__(self, credentials: Credentials, proxies: Optional[Dict[str, str]] = None):