Drop Protocol class to support Python 3.7
This commit is contained in:
parent
3ee2252539
commit
984c11679a
3 changed files with 3 additions and 26 deletions
|
@ -136,29 +136,6 @@ def decode_redis_value(
|
|||
return obj.decode(encoding)
|
||||
|
||||
|
||||
class ExpressionProtocol(Protocol):
|
||||
op: Operators
|
||||
left: ExpressionOrModelField
|
||||
right: ExpressionOrModelField
|
||||
|
||||
def __invert__(self) -> "Expression":
|
||||
pass
|
||||
|
||||
def __and__(self, other: ExpressionOrModelField):
|
||||
pass
|
||||
|
||||
def __or__(self, other: ExpressionOrModelField):
|
||||
pass
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def tree(self) -> str:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class NegatedExpression:
|
||||
"""A negated Expression object.
|
||||
|
@ -814,7 +791,7 @@ class FindQuery:
|
|||
return query.execute()[0]
|
||||
|
||||
|
||||
class PrimaryKeyCreator(Protocol):
|
||||
class PrimaryKeyCreator(abc.ABC):
|
||||
def create_pk(self, *args, **kwargs) -> str:
|
||||
"""Create a new primary key"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue