Pylance-release: Instance variable with same name as class erroneously flagged as unbound

Created on 26 Jul 2020  路  3Comments  路  Source: microsoft/pylance-release

Environment data

One might think it would be rare that you would have a variable with the same name as a class, however, some packages like datetime has lowercase class names. In fact, I found this bug when I tried to name a variable date while I had imported the date class from datetime.

bug fixed in next version

Most helpful comment

Thanks for the bug report. I just introduced a fix for this problem. It will be addressed in the next version of Pylance.

All 3 comments

Thanks for the bug report. I just introduced a fix for this problem. It will be addressed in the next version of Pylance.

Good!

This issue has been fixed in version 2020.7.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202074-29-july-2020

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peach-lasagna picture peach-lasagna  路  3Comments

radix picture radix  路  4Comments

ciaranjudge picture ciaranjudge  路  3Comments

yankyhoffman picture yankyhoffman  路  5Comments

BrunoBlanes picture BrunoBlanes  路  4Comments