Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar-composio committed Dec 27, 2024
1 parent 3d78343 commit 6c30c56
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions python/composio/client/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,7 @@ def list_enums(self) -> list[str]:
)
return response.text.split("\n")


class ExpectedFieldInput(BaseModel):
name: str
type: str
Expand Down
1 change: 0 additions & 1 deletion python/composio/client/enums/action.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pathlib import Path
import typing as t
import warnings

Expand Down
2 changes: 1 addition & 1 deletion python/composio/client/enums/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""

import difflib
from pathlib import Path
import typing as t
from pathlib import Path

from composio.constants import LOCAL_CACHE_DIRECTORY
from composio.exceptions import ComposioSDKError
Expand Down
1 change: 0 additions & 1 deletion python/composio/client/enums/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def iter(cls) -> t.Iterable[str]:
"""Yield the enum names as strings."""
# pylint: disable=import-outside-toplevel
from composio.client import Composio


client = Composio.get_latest()
return client.actions.list_enums()
Expand Down
7 changes: 3 additions & 4 deletions python/composio/client/utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import json
import os
from pathlib import Path
import time
import typing as t

from composio.client import Composio, enums
from composio.client.collections import ActionModel, AppModel, TriggerModel
from composio.client.enums.base import create_action
from composio.client.enums.base import create_action, replacement_action_name
from composio.tools.local import load_local_tools
from composio.utils import get_enum_key
from composio.utils.logging import get_logger
Expand Down Expand Up @@ -253,8 +252,8 @@ def check_cache_refresh(client: Composio) -> None:
logger.debug("Actions to fetch: %s", actions_to_update)
logger.debug("Stale actions: %s", actions_to_delete)

for action in actions_to_delete:
(enums.base.ACTIONS_CACHE / action).unlink()
for action_name in actions_to_delete:
(enums.base.ACTIONS_CACHE / action_name).unlink()

if actions_to_update:
# TODO: handle page size limit
Expand Down

0 comments on commit 6c30c56

Please sign in to comment.