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

Generated docstring has empty :type for parameters annotated with generic types #6519

Open
debonte opened this issue Oct 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working docstrings skip-reassign Optional label that tells the issue automation bot to not reassign the owner

Comments

@debonte
Copy link
Contributor

debonte commented Oct 4, 2024

Environment data

  • Pylance version: 2024.9.104
  • OS and version: Windows 11
  • Python version: 3.9.12

Code Snippet

def foo(input_files: int, output: Union[str, None], output_multiple_files: bool):
    """"""

Repro Steps

  1. Trigger completion within """"""

Expected behavior

:type line of each parameter includes its annotated type, because they are all annotated.

Actual behavior

output parameter's :type is blank. I also tried Tuple[int, int] and got the same result, so I suspect this has something to do with generics.

    """Docstring for foo
    
    :param input_files: Description
    :type input_files: int 
    :param output: Description
    :type output:  
    :param output_multiple_files: Description
    :type output_multiple_files: bool """
@debonte debonte added docstrings skip-reassign Optional label that tells the issue automation bot to not reassign the owner labels Oct 4, 2024
@debonte debonte changed the title Generated docstring should not include :type for parameters annotated with generic types Generated docstring does not include :type for parameters annotated with generic types Oct 4, 2024
@debonte debonte changed the title Generated docstring does not include :type for parameters annotated with generic types Generated docstring has empty :type for parameters annotated with generic types Oct 4, 2024
@KacieKK KacieKK added the bug Something isn't working label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docstrings skip-reassign Optional label that tells the issue automation bot to not reassign the owner
Projects
None yet
Development

No branches or pull requests

2 participants