microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 770 forks source link

Sphinx style docstrings claim that return value is named `out` #6010

Closed debonte closed 1 month ago

debonte commented 3 months ago

Environment data

Code Snippet

def example_func_numpy_docstring(a, b):
    """
    This is a Numpy Style docstring

    Parameters
    ----------
    a : int
        variable 1
    b : int
        variable 2

    Returns
    -------
    int
        sum of a and b
    """
    return a + b

def example_func_sphinx_docstring(a, b):
    """
    This is a Sphinx Style docstring

    :param a: variable 1
    :type a: int
    :param b: variable 2
    :type b: int        
    :return: sum of a and b
    :rtype: int
    """
    return a + b

Repro Steps

  1. Enable docstring experiment -- "python.analysis.supportRestructuredText": true
  2. Paste code above.
  3. Hover over each of the function names.

Expected behavior

Aside from the words Sphinx and Numpy in the first line, the rendered docstrings are identical.

Actual behavior

Sphinx docstring names the return value out: image

Numpy docstring does not: image

rchiodo commented 1 month ago

This should be fixed now.

judej commented 1 month ago

[like] Jude Kavalam reacted to your message:


From: Rich Chiodo @.> Sent: Monday, August 5, 2024 8:15:36 PM To: microsoft/pylance-release @.> Cc: Subscribed @.***> Subject: Re: [microsoft/pylance-release] Sphinx style docstrings claim that return value is named out (Issue #6010)

This should be fixed now.

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/pylance-release/issues/6010#issuecomment-2269839432 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEFXKKKFAIWKSWFQ24XOLDZP7MORBFKMF2HI4TJMJ2XIZLTSWBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIZDOMJQGEZTANBVGGSG4YLNMWUWQYLTL5WGCYTFNSBKK5TBNR2WLKRWGYYTMMRSGE3DKNNENZQW2ZNJNBQXGX3MMFRGK3FMON2WE2TFMN2F65DZOBS2YSLTON2WKQ3PNVWWK3TUUZ2G64DJMNZZJAVEOR4XAZNKOJSXA33TNF2G64TZUV3GC3DVMWUTENRVHEYDENRSGWBKI5DZOBS2K2LTON2WLJLWMFWHKZNKGIZTKMJYG44TMMBUQKSHI6LQMWSWYYLCMVWKK5TBNR2WLKRSG4YTAMJTGA2DKMMCUR2HS4DFUVWGCYTFNSSXMYLMOVS2UNRWGE3DEMRRGY2TLJ3UOJUWOZ3FOKTGG4TFMF2GK. You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.