Skip to content

Commit

Permalink
Refactor (sdk/types): renamed sdk types classmethod from __schema__ t…
Browse files Browse the repository at this point in the history
…o __schema_type_properties__ for clarity
  • Loading branch information
aybruhm committed May 25, 2024
1 parent c0be44e commit 0b30431
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions agenta-cli/agenta/sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def __new__(cls, default_keys: Optional[List[str]] = None):
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "dict"}


class TextParam(str):
@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "text", "type": "string"}


Expand All @@ -49,7 +49,7 @@ def __new__(cls, value: bool = False):
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {
"x-parameter": "bool",
"type": "boolean",
Expand All @@ -64,7 +64,7 @@ def __new__(cls, default: int = 6, minval: float = 1, maxval: float = 10):
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "int", "type": "integer"}


Expand All @@ -77,7 +77,7 @@ def __new__(cls, default: float = 0.5, minval: float = 0.0, maxval: float = 1.0)
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "float", "type": "number"}


Expand Down Expand Up @@ -105,7 +105,7 @@ def __new__(
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "choice", "type": "string", "enum": []}


Expand Down Expand Up @@ -141,7 +141,7 @@ def __new__(
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {
"x-parameter": "grouped_choice",
"type": "string",
Expand All @@ -166,7 +166,7 @@ def __new__(cls, messages: List[Dict[str, str]] = []):
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "messages", "type": "array"}


Expand All @@ -177,7 +177,7 @@ def __new__(cls, url: str):
return instance

@classmethod
def __schema__(cls) -> dict:
def __schema_type_properties__(cls) -> dict:
return {"x-parameter": "file_url", "type": "string"}


Expand Down

0 comments on commit 0b30431

Please sign in to comment.