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
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "redis-om"
|
||||
version = "0.0.7"
|
||||
version = "0.0.8"
|
||||
description = "A high-level library containing useful Redis abstractions and tools, like an ORM and leaderboard."
|
||||
authors = ["Andrew Brookins <andrew.brookins@redis.com>"]
|
||||
maintainers = ["Andrew Brookins <andrew.brookins@redis.com>"]
|
||||
|
|
|
@ -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"""
|
||||
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
skipsdist = true
|
||||
envlist = py38, py39, py310
|
||||
envlist = py37, py38, py39, py310
|
||||
|
||||
[testenv]
|
||||
whitelist_externals = poetry
|
||||
|
|
Loading…
Reference in a new issue