Skip to content

Commit

Permalink
Fix EqualizeMessenger type annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Zickel committed Sep 23, 2024
1 parent b3c7851 commit d3e46b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyro/poutine/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,16 @@ def escape( # type: ignore[empty-body]
def equalize(
sites: Union[str, List[str]],
type: Optional[str],
) -> ConditionMessenger: ...
keep_dist: Optional[bool],
) -> EqualizeMessenger: ...


@overload
def equalize(
fn: Callable[_P, _T],
sites: Union[str, List[str]],
type: Optional[str],
keep_dist: Optional[bool],
) -> Callable[_P, _T]: ...


Expand All @@ -322,6 +324,7 @@ def equalize( # type: ignore[empty-body]
fn: Callable[_P, _T],
sites: Union[str, List[str]],
type: Optional[str],
keep_dist: Optional[bool],
) -> Union[EqualizeMessenger, Callable[_P, _T]]: ...


Expand Down

0 comments on commit d3e46b1

Please sign in to comment.