Try compatibility with Python 3.7

This commit is contained in:
Andras Schmelczer 2022-07-29 09:50:06 +02:00
parent 10b41aadac
commit 85d079fab8
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
10 changed files with 20 additions and 23 deletions

View file

@ -6,7 +6,6 @@ from typing import (
Callable,
Generic,
List,
Literal,
Optional,
Sequence,
Tuple,
@ -19,6 +18,7 @@ from typing import (
from async_lru import alru_cache
from fastapi import FastAPI
from tqdm.cli import tqdm
from typing_extensions import Literal # <= Python 3.7
from ..constants import DASHBOARD_PATH
from ..context import get_context

View file

@ -5,7 +5,9 @@ from abc import ABC, abstractmethod
from functools import lru_cache
from pathlib import Path
from types import TracebackType
from typing import IO, Any, List, Literal, Optional, Type, Union, cast
from typing import IO, Any, List, Optional, Type, Union, cast
from typing_extensions import Literal # <= Python 3.7
from great_ai.utilities import ConfigFile, get_logger

View file

@ -1,19 +1,8 @@
from functools import wraps
from typing import (
Any,
Callable,
Dict,
List,
Literal,
Optional,
Set,
Tuple,
TypeVar,
Union,
cast,
)
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, TypeVar, Union, cast
from dill import load
from typing_extensions import Literal # <= Python 3.7
from ..context import get_context
from ..helper import get_function_metadata_store

View file

@ -2,9 +2,11 @@ from contextvars import ContextVar
from datetime import datetime
from time import perf_counter
from types import TracebackType
from typing import Any, Dict, Generic, List, Literal, Optional, Type, TypeVar, cast
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, cast
from uuid import uuid4
from typing_extensions import Literal # <= Python 3.7
from ..constants import DEVELOPMENT_TAG_NAME, ONLINE_TAG_NAME, PRODUCTION_TAG_NAME
from ..context import get_context
from ..views import Model, Trace

View file

@ -3,7 +3,6 @@ from typing import (
Awaitable,
Callable,
Iterable,
Literal,
Optional,
Sequence,
TypeVar,
@ -12,6 +11,7 @@ from typing import (
)
import dill
from typing_extensions import Literal # <= Python 3.7
from .get_config import get_config
from .manage_communication import manage_communication

View file

@ -4,7 +4,6 @@ from typing import (
Awaitable,
Callable,
Iterable,
Literal,
Optional,
Sequence,
TypeVar,
@ -12,6 +11,8 @@ from typing import (
overload,
)
from typing_extensions import Literal # <= Python 3.7
from .get_config import get_config
from .manage_communication import manage_communication
from .mapper_function import mapper_function

View file

@ -1,4 +1,6 @@
from typing import List, Literal
from typing import List
from typing_extensions import Literal # <= Python 3.7
Operator = Literal[">=", "<=", "<", ">", "!=", "=", "contains"]

View file

@ -1,4 +1,6 @@
from typing import Any, List, Literal, Optional
from typing import Any, List, Optional
from typing_extensions import Literal # <= Python 3.7
from ..hashable_base_model import HashableBaseModel

View file

@ -1,6 +1,5 @@
from typing import Literal
from pydantic import BaseModel
from typing_extensions import Literal # <= Python 3.7
class SortBy(BaseModel):