Skip to content

Commit

Permalink
using base model instead of base settings
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Jul 26, 2023
1 parent 9e8aaea commit 68b98c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions port_ocean/config/integration.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from typing import Any, Literal

from pydantic import BaseSettings
from pydantic import BaseSettings, BaseModel

from port_ocean.config.base import BaseOceanSettings
from port_ocean.core.event_listener import EventListenerSettingsType


class PortSettings(BaseSettings):
class PortSettings(BaseModel):
client_id: str
client_secret: str
base_url: str = "https://api.getport.io"


class IntegrationSettings(BaseSettings):
class IntegrationSettings(BaseModel):
identifier: str
type: str
config: dict[str, Any]
Expand Down
4 changes: 2 additions & 2 deletions port_ocean/core/event_listener/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from abc import abstractmethod
from typing import TypedDict, Callable, Any, Awaitable

from pydantic import BaseSettings
from pydantic import BaseModel


class EventListenerEvents(TypedDict):
Expand All @@ -20,7 +20,7 @@ async def start(self) -> None:
pass


class EventListenerSettings(BaseSettings):
class EventListenerSettings(BaseModel):
type: str

def to_request(self) -> dict[str, Any]:
Expand Down

0 comments on commit 68b98c2

Please sign in to comment.