com2ann icon indicating copy to clipboard operation
com2ann copied to clipboard

Add support for extraction of types from docstring

Open ilevkivskyi opened this issue 8 years ago • 3 comments

We could support at least Google style and Numpydoc

ilevkivskyi avatar Mar 12 '17 15:03 ilevkivskyi

any progress about this?

jussike avatar Nov 13 '20 13:11 jussike

Is Google style like https://github.com/internetarchive/openlibrary/issues/6755 ?

  • https://google.github.io/styleguide/pyguide.html#383-functions-and-methods has shifted to type hints.

cclauss avatar Jul 18 '22 08:07 cclauss

@jussike I don't have any immediate plans for this, but open to contributions. (The only requirement, this feature should be behind a flag and type comments should take precedence over docstring types if both are present.)

@cclauss IIUC old Google style is more like

    Args:
        param_name (type): description.
        ...
    Returns:
        type: description.

What you show is what PyCharm uses (also popular style btw)

ilevkivskyi avatar Jul 18 '22 11:07 ilevkivskyi