diff --git a/pyro/poutine/block_messenger.py b/pyro/poutine/block_messenger.py index bdd1deb709..7c9f1847b2 100644 --- a/pyro/poutine/block_messenger.py +++ b/pyro/poutine/block_messenger.py @@ -110,7 +110,7 @@ class BlockMessenger(Messenger): :param list hide: list of site names to hide :param list expose: list of site names to be exposed while all others hidden :param list hide_types: list of site types to be hidden - :param lits expose_types: list of site types to be exposed while all others hidden + :param list expose_types: list of site types to be exposed while all others hidden :returns: stochastic function decorated with a :class:`~pyro.poutine.block_messenger.BlockMessenger` """ diff --git a/pyro/poutine/handlers.py b/pyro/poutine/handlers.py index af4f36ccb2..969c5476d6 100644 --- a/pyro/poutine/handlers.py +++ b/pyro/poutine/handlers.py @@ -81,6 +81,7 @@ def _make_handler(msngr_cls, module=None): def handler_decorator(func): + @functools.wraps(func) def handler(fn=None, *args, **kwargs): if fn is not None and not ( callable(fn) or isinstance(fn, collections.abc.Iterable) @@ -101,7 +102,6 @@ def handler(fn=None, *args, **kwargs): ) + (msngr_cls.__doc__ if msngr_cls.__doc__ else "") ) - handler.__name__ = func.__name__ if module is not None: handler.__module__ = module return handler