From 16f182920898bb49af9c02e4dcc7b5fb4c5322d8 Mon Sep 17 00:00:00 2001 From: Alex Ungurianu Date: Thu, 17 Nov 2022 10:05:53 +0000 Subject: [PATCH] fixup: lease typed dict --- kazoo/recipe/lease.py | 11 ++++++----- setup.cfg | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/kazoo/recipe/lease.py b/kazoo/recipe/lease.py index d2fa6a35..81f08a49 100644 --- a/kazoo/recipe/lease.py +++ b/kazoo/recipe/lease.py @@ -14,15 +14,16 @@ from kazoo.exceptions import CancelledError +from typing_extensions import TypedDict + if TYPE_CHECKING: from kazoo.client import KazooClient from typing import Callable, Optional - from typing_extensions import TypedDict - class LeaseData(TypedDict): - version: int - holder: str - end: str +class LeaseData(TypedDict): + version: int + holder: str + end: str class NonBlockingLease(object): diff --git a/setup.cfg b/setup.cfg index 6defdf18..a8c7a7ac 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,6 +42,7 @@ packages = find: install_requires = six selectors2>=2.0.2 ; python_version < "3.4.0" + typing-extensions [aliases] release = sdist bdist_wheel @@ -66,6 +67,7 @@ test = typing = mypy + types-six types-mock eventlet = @@ -86,5 +88,6 @@ alldeps = %(gevent)s %(sasl)s %(docs)s + %(typing)s