From 8a90484809eac28e41ce0954f84794e9962838bb Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Mon, 10 Feb 2025 14:52:44 +0500 Subject: [PATCH] Reword the condition. --- web_poet/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_poet/pages.py b/web_poet/pages.py index 26d31afb..b8e5963d 100644 --- a/web_poet/pages.py +++ b/web_poet/pages.py @@ -40,8 +40,8 @@ def is_injectable(cls: Any) -> bool: """Return True if ``cls`` is a class which inherits from :class:`~.Injectable`.""" return ( - not isinstance(cls, GenericAlias) - and isinstance(cls, type) + isinstance(cls, type) + and not isinstance(cls, GenericAlias) and issubclass(cls, Injectable) )