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

One dot is missing for leading ellipsis in doc markdown #2945

Closed
Azureblade3808 opened this issue Jun 16, 2022 · 2 comments
Closed

One dot is missing for leading ellipsis in doc markdown #2945

Azureblade3808 opened this issue Jun 16, 2022 · 2 comments
Assignees
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs investigation Could be an issue - needs investigation

Comments

@Azureblade3808
Copy link

Azureblade3808 commented Jun 16, 2022

Environment data

  • Language Server version: v2022.6.20
  • OS and version: Windows 7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.12 Anaconda

Code Snippet

def annotation(x):
    """
    Example
    -------
    >>> class C:
    ...     @annotation
    ...     def f():
    ...         ...
    """
    return x

Repro Steps

  1. Copy and paste the code snippet into a python file.
  2. Hover annotation and see its doc.

Expected behavior

The doc markdown is rendered correctly.

Actual behavior

Every leading ellipsis is short of one dot.
image

Additional Info

  1. It seems that a "@" phrase after leading dot(s) is causing this behavior. And a simplified sample would be
def f():
    """
    >>> a
    . @1
    .. 2
    ... 3
    .... 4
    """
  1. Wrapping the code as code blocks using ``` doesn't help.

  2. As far as I can tell, the same doc(s) can be rendered correctly up to v2021.1.3, but not since v2021.2.1.

@github-actions github-actions bot removed the triage label Jun 16, 2022
@judej judej added bug Something isn't working needs investigation Could be an issue - needs investigation and removed bug Something isn't working labels Jun 16, 2022
@judej judej added triage needs investigation Could be an issue - needs investigation and removed needs investigation Could be an issue - needs investigation docstrings labels Jun 27, 2022
@github-actions github-actions bot removed the triage label Jun 27, 2022
@rchiodo rchiodo self-assigned this Oct 17, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Oct 17, 2022

I believe this is a result of fixing cv2 doc strings in this commit:
microsoft/pyright@e278f28

I'll look into if we can special case the cv2 instead.

@heejaechang
Copy link
Contributor

This issue has been fixed in prerelease version 2022.10.31, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs investigation Could be an issue - needs investigation
Projects
None yet
Development

No branches or pull requests

5 participants