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

Python code prompt in vscode with docstring #164098

Closed
yangtzech opened this issue Oct 20, 2022 · 4 comments
Closed

Python code prompt in vscode with docstring #164098

yangtzech opened this issue Oct 20, 2022 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@yangtzech
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.71.2 (user setup)
  • OS Version: Windows_NT x64 10.0.19044

Steps to Reproduce:

  1. Write some comments in Python function
  2. VScode displays different from Pycharm

Below is the test code:

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

def test(param1, param2):
    """
    description: 
    param {*} param1: first parameter
    param {*} param2: second paramter
    return {*}

    examples: 
    .. code-block:: Python

        belief = [.05, .05, .05, .05, .55, .05, .05, .05, .05, .05]
        prior = predict(belief, offset=2, kernel=[.1, .8, .1])
    """

and this is what VSCode shows:
image

and this is what Pycharm shows:
image

The problem is that the return {*} part is in the same line as param2, and the examples code is not interpreted.

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.72.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@yangtzech
Copy link
Author

The problem remains the same in the latest release.

@mjbvz
Copy link
Contributor

mjbvz commented Oct 20, 2022

/extPython

@VSCodeTriageBot
Copy link
Collaborator

It looks like this is caused by the Python extension. Please file the issue to the Python extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot added the *caused-by-extension Issue identified to be caused by an extension label Oct 20, 2022
@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants