Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible edge case #14

Open
ianhi opened this issue Feb 5, 2021 · 1 comment
Open

Possible edge case #14

ianhi opened this issue Feb 5, 2021 · 1 comment

Comments

@ianhi
Copy link
Contributor

ianhi commented Feb 5, 2021

I'm not sure what I'd expect velin to do here but just pointing out that it doesn't currently recognize the returns as a section in this docstring, instead treating it as another parameter. I suppose there is a fundamental ambiguity here unfortunately, so it may not be fixable, but perhaps should be flagged?

def f(blarg):
    """
    Parameters
    ----------
    blarg : bool
        some description
    returns
    -------
    init_val, control
    """
    pass

gives this output:

(mpl-inter) ian@fermented-beans:~/Documents/jupyter/mpl-interactions$ velin v_test.py 
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:513 in  | v_test.py:f
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:514 in  |   missing: set()
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:515 in  |   extra: {'-------', 'returns', 'init_val', 'control'}
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:513 in  | v_test.py:f
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:514 in  |   missing: set()
~/mambaforge/envs/mpl-inter/lib/python3.9/site-packages/velin/ref.py:515 in  |   extra: {'-------', 'returns', 'init_val', 'control'}
@Carreau
Copy link
Owner

Carreau commented Apr 8, 2021

This is an issue in numpydoc parsing. you actually do need a blank line before Returns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants