Skip to content

Commit

Permalink
feat: change typing
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-dixit committed Apr 11, 2024
1 parent 982071f commit e867ed9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/composio/sdk/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def execute_action(self, action: Action, params: dict):
resp = account.execute_action(action, params)
return resp

def get_list_of_connections(self, app_name: list[App | str] = None) -> list[ConnectedAccount]:
def get_list_of_connections(self, app_name: list[Union[App, str]] = None) -> list[ConnectedAccount]:
for i, item in enumerate(app_name):
if isinstance(item, App):
app_name[i] = item.value
Expand Down
6 changes: 4 additions & 2 deletions core/composio/sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from pydantic import BaseModel
import subprocess

from typing import Union

def _get_enum_key(name):
return name.upper().replace(' ', '_').replace('-', '_')

Expand Down Expand Up @@ -55,8 +57,8 @@ def generate_enums():
f.write(enum_content)

class GitUserInfo(BaseModel):
name: str | None
email: str | None
name: Union[None, str]
email: Union[None, str]

def get_git_user_info() -> GitUserInfo:
try:
Expand Down

0 comments on commit e867ed9

Please sign in to comment.