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

Built-in member is considered undefined if there is a variable of the same name in the global scope #1320

Closed
Azureblade3808 opened this issue May 20, 2021 · 2 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@Azureblade3808
Copy link

Environment data

  • Language Server version: 2021.5.3
  • OS and version: Windows 7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.8 Anaconda

Sample

max_ = max
max = lambda a, b: a if a > b else b

Expected behavior

The usage is valid.

Actual behavior

image

@Azureblade3808 Azureblade3808 changed the title Built-in member is considered undefined if there is a variable of the same name (all in the global scope) Built-in member is considered undefined if there is a variable of the same name (both in the global scope) May 20, 2021
@Azureblade3808 Azureblade3808 changed the title Built-in member is considered undefined if there is a variable of the same name (both in the global scope) Built-in member is considered undefined if there is a variable of the same name in the global scope May 20, 2021
@judej judej added the bug Something isn't working label May 20, 2021
@github-actions github-actions bot removed the triage label May 20, 2021
@erictraut
Copy link
Contributor

Thanks for the bug report. This bug was introduced recently as part of another bug fix, and it slipped past our regression tests. I've fixed the problem and added more tests so it doesn't regress in the future. A fix will be included in the next release.

@erictraut erictraut added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label May 21, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.5.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202154-26-may-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants