@ -20,9 +20,9 @@ And what's a better name for python ORM than snakes cabinet :)
|
||||
|
||||
"""
|
||||
try:
|
||||
from importlib import metadata
|
||||
from importlib.metadata import version # type: ignore
|
||||
except ImportError: # pragma: no cover
|
||||
import importlib_metadata as metadata # type: ignore
|
||||
from importlib_metadata import version # type: ignore
|
||||
from ormar.protocols import QuerySetProtocol, RelationProtocol # noqa: I100
|
||||
from ormar.decorators import ( # noqa: I100
|
||||
post_delete,
|
||||
@ -82,7 +82,7 @@ class UndefinedType: # pragma no cover
|
||||
|
||||
Undefined = UndefinedType()
|
||||
|
||||
__version__ = metadata.version("ormar")
|
||||
__version__ = version("ormar")
|
||||
__all__ = [
|
||||
"Integer",
|
||||
"BigInteger",
|
||||
|
||||
@ -12,7 +12,7 @@ from ormar.fields.base import BaseField # noqa I101
|
||||
from ormar.fields.sqlalchemy_encrypted import EncryptBackends
|
||||
|
||||
try:
|
||||
from typing import Literal
|
||||
from typing import Literal # type: ignore
|
||||
except ImportError: # pragma: no cover
|
||||
from typing_extensions import Literal # type: ignore
|
||||
|
||||
@ -468,13 +468,13 @@ class JSON(ModelFieldFactory, pydantic.Json):
|
||||
if TYPE_CHECKING: # pragma: nocover # noqa: C901
|
||||
|
||||
@overload
|
||||
def LargeBinary(
|
||||
def LargeBinary( # type: ignore
|
||||
max_length: int, *, represent_as_base64_str: Literal[True], **kwargs: Any
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@overload
|
||||
def LargeBinary(
|
||||
def LargeBinary( # type: ignore
|
||||
max_length: int, *, represent_as_base64_str: Literal[False], **kwargs: Any
|
||||
) -> bytes:
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user