microsoft / pyright

Static Type Checker for Python
Other
13.14k stars 1.4k forks source link

Possible bug in getTypeOfFunction() #8787

Closed bschnurr closed 4 weeks ago

bschnurr commented 4 weeks ago

Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.

If you have a question about typing or a behavior that you’re seeing in Pyright (as opposed to a bug report or enhancement request), consider posting to the Pyright discussion forum.

Describe the bug A clear and concise description of the behavior you are seeing and the expected behavior along with steps to reproduce it.

Possible knock on behaviour change from https://github.com/microsoft/pyright/commit/2b603b9144698964f09f308bb70e14b2a60f11b1

see PR. https://github.com/microsoft/pyright/pull/8786

erictraut commented 4 weeks ago

@bschnurr, can you provide more details about the bug including repro steps?

bschnurr commented 4 weeks ago

the repro is in the PR.. running the unit test

erictraut commented 4 weeks ago

I've looked at the PR, and I'm not able to figure out the repro. I only see a couple of screen shots. No repro steps or minimal code samples. Please provide additional details.

bschnurr commented 4 weeks ago

i see. well i cant find an LSP call in pyright thats broken yet.. Only the internal data structure has change when calling for the type of a overloaded function.

erictraut commented 4 weeks ago

If you think that there's a potential bug here, please describe the symptoms that you are seeing and how you discovered the problem. Do you have a test that's failing? If so, what is it testing? Can you extract the code for this test? Is there a user-visible behavior that has changed? Right now, I just see a couple of screen shots of a debugger, so there's really not much for me to go on.