Skip to content

Commit

Permalink
Fix type hint to preserve old typing behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielshaar committed Sep 11, 2024
1 parent d164265 commit cd66fc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ddtrace/_trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ def context(self) -> Context:
return self._context

@property
def _local_root(self) -> "Span":
# This can't actually return None, but we say it can to satisfy type checking.
def _local_root(self) -> Optional["Span"]:
if self._local_root_value is None:
return self
return self._local_root_value
Expand Down

0 comments on commit cd66fc2

Please sign in to comment.