We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 106fe71 commit e6415aeCopy full SHA for e6415ae
1 file changed
sentry_sdk/traces.py
@@ -37,6 +37,7 @@
37
Callable,
38
Iterator,
39
Optional,
40
+ overload,
41
ParamSpec,
42
TypeVar,
43
Union,
@@ -703,6 +704,23 @@ def timestamp(self) -> "Optional[datetime]":
703
704
return None
705
706
707
+if TYPE_CHECKING:
708
+
709
+ @overload
710
+ def trace(
711
+ func: "Callable[P, R]",
712
+ ) -> "Callable[P, R]": ...
713
714
715
716
+ func: None = None,
717
+ *,
718
+ name: "Optional[str]" = None,
719
+ attributes: "Optional[dict[str, Any]]" = None,
720
+ active: bool = True,
721
+ ) -> "Callable[[Callable[P, R]], Callable[P, R]]": ...
722
723
724
def trace(
725
func: "Optional[Callable[P, R]]" = None,
726
*,
0 commit comments