Skip to content

Commit

Permalink
fix decorator returntype
Browse files Browse the repository at this point in the history
  • Loading branch information
eelcovdw committed Sep 26, 2024
1 parent bd72687 commit 01d77f2
Showing 1 changed file with 6 additions and 1 deletion.
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()

0 comments on commit 01d77f2

Please sign in to comment.