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

fix decorator returntype #9322

Merged
merged 1 commit into from
Sep 26, 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
7 changes: 6 additions & 1 deletion packages/syft/src/syft/util/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
from typing import Any
from typing import TYPE_CHECKING
from typing import TypeVar

# relative
Expand Down Expand Up @@ -131,4 +132,8 @@ def instrument_sqlalchemny() -> None:
logger.error(f"Failed to load SQLAlchemyInstrumentor. {e}")


instrument = setup_instrumenter()
if TYPE_CHECKING:
# To let static type checker know the returntype of instrument decorators
instrument = no_instrument
else:
instrument = setup_instrumenter()
Loading