Skip to content

Commit

Permalink
Do not import fake_context if not needed (#1877)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Oct 27, 2024
1 parent 270332d commit 524af96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion faststream/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from faststream.asgi.app import AsgiFastStream
from faststream.cli.supervisors.utils import set_exit
from faststream.exceptions import ValidationError
from faststream.utils.functions import fake_context

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

except ImportError:
from faststream.utils.functions import fake_context

catch_startup_validation_error = fake_context

0 comments on commit 524af96

Please sign in to comment.