Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not import fake_context if not needed #1877

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading