theacodes / sphinx-docstring-typing

typing support for Sphinx docstrings
Apache License 2.0
1 stars 1 forks source link

Bare Callable doesn't get picked up by extension #3

Open dhermes opened 7 years ago

dhermes commented 7 years ago

i.e. Callable as standalone:

    Args:
        target_mesh (~galerkin_reconstruction.Mesh): A mesh which is covered
            by a ``donor_mesh``.
        donor_mesh (~galerkin_reconstruction.Mesh): A mesh, presumably of the
            same degree as ``target_mesh``.
        intersect_callback (Callable): Hi Jon this is the issue
        start_index (Optional[int]): The surface element index to start the
            search with. Defaults to ``0``.

yields

screenshot from 2017-01-04 16-58-42

while

        intersect_callback (Callable[float]): Hi Jon this is the issue

yields

screenshot from 2017-01-04 16-59-22

theacodes commented 7 years ago

Callable is typically not supposed to be bare, yeah?

dhermes commented 7 years ago

Don't know.

theacodes commented 7 years ago

(insert shruggie here)

dhermes commented 7 years ago

From docs:

A plain Callable is equivalent to Callable[..., Any], and in turn to collections.abc.Callable.