Skip to content

Using the collecting variable of iterable unpacking causes "used before definition" error #3543

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

Closed
mcpower opened this issue Dec 4, 2018 · 1 comment
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@mcpower
Copy link

mcpower commented Dec 4, 2018

Using the example from the PEP:

a, *b, c = range(5)
print(b)

produces

{
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "use-before-def",
	"severity": 4,
	"message": "'b' used before definition",
	"source": "Python",
	"startLineNumber": 2,
	"startColumn": 7,
	"endLineNumber": 2,
	"endColumn": 8
}

Environment data

  • VS Code version: 1.29.1
  • Extension version (available under the Extensions sidebar): 2018.11.0
  • OS and version: Windows 10 1803
  • Python version (& distribution if applicable, e.g. Anaconda): CPython 3.7.0
  • Python Language Server version: 0.1.65.0
@mcpower
Copy link
Author

mcpower commented Jun 30, 2019

I can confirm that this has been fixed in a recent version of the language server.

@mcpower mcpower closed this as completed Jun 30, 2019
@ghost ghost removed the needs upstream fix label Jun 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants