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

docstring: Regarding Korean line spacing problem #4615

Closed
swdev-j opened this issue Jul 16, 2023 · 4 comments · Fixed by microsoft/pyright#6307
Closed

docstring: Regarding Korean line spacing problem #4615

swdev-j opened this issue Jul 16, 2023 · 4 comments · Fixed by microsoft/pyright#6307
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@swdev-j
Copy link

swdev-j commented Jul 16, 2023

Environment data

  • Language Server version: v2023.7.21
  • OS and version: windows 11
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.12

Code Snippet

# -*- coding: utf-8 -*-

def fun(a:int, b:int, c:int):
    """_summary_
    test
    
    Args:
        a (int): _description_
        b (int): 한국어
        c (int): _description_
    """

print(fun.__doc__)

Repro Steps

  1. write and standard docstring that contains parenthesis and then hover over the function to observe the formatting of the docstring.
  2. compare this to the expected formatting given by print(my_function.doc).

Expected behavior

I believe this will output something like below.

image

Actual behavior

But, I hover over the function, it does not same output.
It should show the same result as print.

image

@heejaechang heejaechang added the bug Something isn't working label Jul 24, 2023
@heejaechang
Copy link
Contributor

looks like our regex for doc string doesn't work properly with Korean. (or any other language except English)

@heejaechang
Copy link
Contributor

tagging @Bill ?

@bschnurr bschnurr assigned bschnurr and unassigned heejaechang Jul 24, 2023
@bschnurr bschnurr removed their assignment Jan 5, 2024
@rchiodo rchiodo self-assigned this Jun 6, 2024
@rchiodo rchiodo added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Jun 12, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Jun 14, 2024

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

@rchiodo rchiodo closed this as completed Jun 14, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Jun 14, 2024

The fix for this issue is behind an experimental feature flag:

"python.analysis.supportRestructuredText": true

If you want to try out our new restructuredText support, enable this flag. It's behind a flag at the moment until we can make sure it handles all the possible Sphinx/GoogleDoc/Epytext scenarios that customers need. Please log additional issues if this setting isn't working out for you.

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants