From 168381d710d59849813f13885ec0d4efe51c93ba Mon Sep 17 00:00:00 2001 From: Sachaa-Thanasius Date: Sat, 21 Sep 2024 23:36:27 +0530 Subject: [PATCH] Account for pyright --- src/defer_imports/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defer_imports/__init__.py b/src/defer_imports/__init__.py index 808279f..3fa8853 100644 --- a/src/defer_imports/__init__.py +++ b/src/defer_imports/__init__.py @@ -1049,7 +1049,7 @@ class DeferredContext: __slots__ = ("is_active", "_import_ctx_token", "_defer_ctx_token") def __enter__(self) -> None: - self.is_active = bool(_current_defer_config.get(False)) + self.is_active: bool = bool(_current_defer_config.get(False)) if self.is_active: self._defer_ctx_token = _is_deferred.set(True) self._import_ctx_token = _original_import.set(builtins.__import__)