naiquevin / sphinx-doc.el

Generate Sphinx friendly docstrings for Python functions in Emacs
126 stars 29 forks source link

Support for PEP 3107 #11

Open pallix opened 9 years ago

pallix commented 9 years ago

It seems function annotations are not supported (https://www.python.org/dev/peps/pep-3107/) as M-x sphinx-doc does not work on the following code:

def get(self) -> dict:
    raise HTTPMethodNotAllowed()
naiquevin commented 9 years ago

I am not much familiar with function annotations but it seems supporting them in the current version of sphinx-doc might be tricky due to the way the function definitions are parsed for arguments.

Annotations is a good feature and I think it's definitely worth the effort to study PEP-3107 and add support for it. But I am not sure if I have the time to work on it at the moment. Please feel free to share any ideas or send pull requests :-)

Thanks.