Skip to content

Commit

Permalink
fix: Remove proto-plus imports (#4044)
Browse files Browse the repository at this point in the history
remove proto-plus imports

Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
  • Loading branch information
tokoko authored Mar 27, 2024
1 parent c364be4 commit ad8f572
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions sdk/python/feast/base_feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@
# limitations under the License.
from abc import ABC, abstractmethod
from datetime import datetime
from typing import Dict, List, Optional, Type
from typing import Dict, List, Optional, Type, Union

from google.protobuf.json_format import MessageToJson
from proto import Message
from google.protobuf.message import Message

from feast.feature_view_projection import FeatureViewProjection
from feast.field import Field
from feast.protos.feast.core.FeatureView_pb2 import FeatureView as FeatureViewProto
from feast.protos.feast.core.OnDemandFeatureView_pb2 import (
OnDemandFeatureView as OnDemandFeatureViewProto,
)
from feast.protos.feast.core.StreamFeatureView_pb2 import (
StreamFeatureView as StreamFeatureViewProto,
)


class BaseFeatureView(ABC):
Expand Down Expand Up @@ -89,7 +96,9 @@ def proto_class(self) -> Type[Message]:
pass

@abstractmethod
def to_proto(self) -> Message:
def to_proto(
self,
) -> Union[FeatureViewProto, OnDemandFeatureViewProto, StreamFeatureViewProto]:
pass

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/registry/base_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from typing import Any, Dict, List, Optional

from google.protobuf.json_format import MessageToJson
from proto import Message
from google.protobuf.message import Message

from feast.base_feature_view import BaseFeatureView
from feast.data_source import DataSource
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from urllib.parse import urlparse

from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
from proto import Message
from google.protobuf.message import Message

from feast import usage
from feast.base_feature_view import BaseFeatureView
Expand Down

0 comments on commit ad8f572

Please sign in to comment.