Skip to content

Commit

Permalink
fix: more ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu-OD committed Nov 28, 2024
1 parent cf98d74 commit c5faa02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions literalai/api/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from typing_extensions import deprecated
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Expand Down Expand Up @@ -148,7 +147,7 @@ def raise_error(error):
logger.error(f"Failed to {description}: {error}")
raise Exception(error)

variables = _prepare_variables(variables)
variables = prepare_variables(variables)

async with httpx.AsyncClient(follow_redirects=True) as client:
response = await client.post(
Expand Down Expand Up @@ -443,7 +442,7 @@ async def upload_file(
# Prepare form data
form_data = (
{}
) # type: Dict[str, Union[Tuple[Union[str, None], Any], Tuple[Union[str, None], Any, Any]]]
) # type: Dict[str, Union[tuple[Union[str, None], Any], tuple[Union[str, None], Any, Any]]]
for field_name, field_value in fields.items():
form_data[field_name] = (None, field_value)

Expand Down
8 changes: 2 additions & 6 deletions literalai/api/synchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from typing_extensions import deprecated
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Expand Down Expand Up @@ -105,9 +104,6 @@
from literalai.observability.thread import Thread
from literalai.prompt_engineering.prompt import Prompt, ProviderSettings

if TYPE_CHECKING:
from typing import Tuple # noqa: F401

import httpx

from literalai.my_types import PaginatedResponse, User
Expand Down Expand Up @@ -150,7 +146,7 @@ def raise_error(error):
logger.error(f"Failed to {description}: {error}")
raise Exception(error)

variables = _prepare_variables(variables)
variables = prepare_variables(variables)
with httpx.Client(follow_redirects=True) as client:
response = client.post(
self.graphql_endpoint,
Expand Down Expand Up @@ -441,7 +437,7 @@ def upload_file(
# Prepare form data
form_data = (
{}
) # type: Dict[str, Union[Tuple[Union[str, None], Any], Tuple[Union[str, None], Any, Any]]]
) # type: Dict[str, Union[tuple[Union[str, None], Any], tuple[Union[str, None], Any, Any]]]
for field_name, field_value in fields.items():
form_data[field_name] = (None, field_value)

Expand Down

0 comments on commit c5faa02

Please sign in to comment.