From 01df7d24c5579dda11db0afc5ad6acca820bb05d Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Thu, 14 Apr 2022 09:41:52 +0100 Subject: [PATCH] x --- my/core/kompress.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/my/core/kompress.py b/my/core/kompress.py index 3037c9d..f5724ad 100644 --- a/my/core/kompress.py +++ b/my/core/kompress.py @@ -122,10 +122,13 @@ def kexists(path: PathIsh, subpath: str) -> bool: import zipfile if sys.version_info[:2] >= (3, 8): + # meh... zipfile.Path is not available on 3.7 ZipPathBase = zipfile.Path else: - # meh... it's not available on 3.7 - ZipPathBase = object + if typing.TYPE_CHECKING: + ZipPathBase = pathlib.Path + else: + ZipPathBase = object class ZipPath(ZipPathBase):