File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2323 Union ,
2424 no_type_check ,
2525)
26- from typing_extensions import get_args , get_origin
2726
2827import aioredis
2928from aioredis .client import Pipeline
3332from pydantic .main import ModelMetaclass , validate_model
3433from pydantic .typing import NoArgAnyCallable
3534from pydantic .utils import Representation
35+ from typing_extensions import Protocol , get_args , get_origin
3636from ulid import ULID
3737
3838from ..checks import has_redis_json , has_redisearch
@@ -848,13 +848,14 @@ async def get_item(self, item: int):
848848 return result [0 ]
849849
850850
851- class PrimaryKeyCreator (abc . ABC ):
851+ class PrimaryKeyCreator (Protocol ):
852852 def create_pk (self , * args , ** kwargs ) -> str :
853853 """Create a new primary key"""
854854
855855
856856class UlidPrimaryKey :
857- """A client-side generated primary key that follows the ULID spec.
857+ """
858+ A client-side generated primary key that follows the ULID spec.
858859 https://github.com/ulid/javascript#specification
859860 """
860861
You can’t perform that action at this time.
0 commit comments