microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 766 forks source link

Missing docstring for descriptor alias #6392

Open armoha opened 2 months ago

armoha commented 2 months ago

Environment data

Code Snippet

class Foo:
    class Descriptor:
        def __get__(self, obj, objtype=None):
            return self

    a = b = c = Descriptor()
    "this docstring is only visible for Foo.c"

GIF 2024-09-15 오후 11-00-19

Repro Steps

  1. input above code

Expected behavior

Same docstring is shown for Foo.a/b/c

Actual behavior

Docstring is missing while autocompletion and type hint work fine.

KacieKK commented 2 months ago

Thank you for reporting, I can reproduce it.