Skip to content

Commit

Permalink
mark flaky test / fix more imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Dec 6, 2023
1 parent 0438cb2 commit acf754f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/marvin/components/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
Any,
Callable,
Coroutine,
Literal,
Optional,
TypeVar,
)

from typing_extensions import ParamSpec
from typing_extensions import Literal, ParamSpec

if TYPE_CHECKING:
from openai._base_client import HttpxBinaryResponseContent
Expand Down
3 changes: 2 additions & 1 deletion src/marvin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
import os
from contextlib import contextmanager
from copy import deepcopy
from typing import TYPE_CHECKING, Any, Literal, Optional, Union
from typing import TYPE_CHECKING, Any, Optional, Union

from pydantic import Field, SecretStr
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing_extensions import Literal

if TYPE_CHECKING:
from openai import AsyncClient, Client
Expand Down
2 changes: 2 additions & 0 deletions tests/components/test_ai_classifier.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum

import pytest
from marvin import ai_classifier
from typing_extensions import Literal

Expand Down Expand Up @@ -27,6 +28,7 @@ def sentiment(text: str) -> Sentiment:

assert result == "Positive"

@pytest.mark.flaky(reruns=3)
def test_ai_classifier_literal_return_type_with_docstring(self):
@ai_classifier
def sentiment(text: str) -> Sentiment:
Expand Down
3 changes: 2 additions & 1 deletion tests/components/test_ai_model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from typing import List, Literal, Optional
from typing import List, Optional

import pytest
from marvin import ai_model
from pydantic import BaseModel, Field
from typing_extensions import Literal

from tests.utils import pytest_mark_class

Expand Down

0 comments on commit acf754f

Please sign in to comment.