Skip to content

Commit 524af96

Browse files
authored
Do not import fake_context if not needed (#1877)
1 parent 270332d commit 524af96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

faststream/app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from faststream.asgi.app import AsgiFastStream
1818
from faststream.cli.supervisors.utils import set_exit
1919
from faststream.exceptions import ValidationError
20-
from faststream.utils.functions import fake_context
2120

2221
P_HookParams = ParamSpec("P_HookParams")
2322
T_HookReturn = TypeVar("T_HookReturn")
@@ -77,4 +76,6 @@ async def catch_startup_validation_error() -> AsyncIterator[None]:
7776
raise ValidationError(fields=fields) from e
7877

7978
except ImportError:
79+
from faststream.utils.functions import fake_context
80+
8081
catch_startup_validation_error = fake_context

0 commit comments

Comments
 (0)