Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Fix References_Parameters_NestedFunction#118

Merged
MikhailArkhipov merged 1 commit intomicrosoft:masterfrom
MikhailArkhipov:master
Sep 20, 2018
Merged

Fix References_Parameters_NestedFunction#118
MikhailArkhipov merged 1 commit intomicrosoft:masterfrom
MikhailArkhipov:master

Conversation

@MikhailArkhipov
Copy link
Copy Markdown

Fixes #39

if (defScope == null) {
variables = _unit.State.BuiltinModule.GetDefinitions(name.Name)
.SelectMany(ToVariables);
if (!scope.EnumerateTowardsGlobal.Any()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to call EnumerateTowardsGlobal.Any(), it should be enough to check after the foreach if variables is empty.

Copy link
Copy Markdown
Author

@MikhailArkhipov MikhailArkhipov Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure it would be same thing. Any means there are no scopes so we should fetch from global. No variables may mean there are scopes but nothing was found.

@MikhailArkhipov MikhailArkhipov merged commit 8b7dbe3 into microsoft:master Sep 20, 2018
jakebailey pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
Fix References_Parameters_NestedFunction
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants