Skip to content

Commit

Permalink
fix: typing with version of propcache older than 1.0.0 (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 6, 2024
1 parent 33f1f1e commit 94f9eaa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/uiprotect/_compat.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""Compat for external lib versions."""

try:
from propcache.api import cached_property
except ImportError:
from propcache import cached_property
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from functools import cached_property
else:
try:
from propcache.api import cached_property
except ImportError:
from propcache import cached_property

__all__ = ("cached_property",)

0 comments on commit 94f9eaa

Please sign in to comment.