summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/concurrency.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/util/concurrency.py')
-rw-r--r--lib/sqlalchemy/util/concurrency.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/concurrency.py b/lib/sqlalchemy/util/concurrency.py
index 6b94a2294..778d1275b 100644
--- a/lib/sqlalchemy/util/concurrency.py
+++ b/lib/sqlalchemy/util/concurrency.py
@@ -4,8 +4,10 @@
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
+from __future__ import annotations
import asyncio # noqa
+import typing
have_greenlet = False
greenlet_error = None
@@ -28,7 +30,7 @@ else:
_util_async_run_coroutine_function as _util_async_run_coroutine_function, # noqa F401, E501
)
-if not have_greenlet:
+if not typing.TYPE_CHECKING and not have_greenlet:
def _not_implemented():
# this conditional is to prevent pylance from considering