FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bug fixes by MikhailArkhipov · Pull Request #418 · microsoft/python-language-server · GitHub

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

Bug fixes - #418

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 10 commits into
microsoft:masterfrom
MikhailArkhipov:master
Nov 23, 2018
Merged

Bug fixes#418
Mikhail Arkhipov (MikhailArkhipov) merged 10 commits into
microsoft:masterfrom
MikhailArkhipov:master

Conversation

Mikhail Arkhipov (MikhailArkhipov) commented Nov 19, 2018
edited
Loading

Copy link
Copy Markdown

Fixes #397 (remove name protocol from tuple)
Fixes #383 (do not return nulls, return empty sets)
Fixes #378 (null check)
Fixes #379 (explicit protocol comparison)

Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Unless there's something else you want to address, LGTM.

public override IEnumerable<ILocationInfo> Locations => _original.Locations?.MaybeEnumerate();

public override string Name => _original == null ? base.Name : this._original.Name;
public override string Name => _original == null ? base.Name : _original.Name;

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why in this case we call base.Name, and in previous explicitly return empty enumerable instead of calling base.Locations, which also returns empty enumerable?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good question. No idea.

return Enumerable.Empty<ILocationInfo>();
}
return defns.Definitions.Select(l => l.GetLocationInfo()).Where(l => l != null);
return defns.Definitions.Select(l => l.GetLocationInfo()).ExcludeDefault();

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks like we have two almost identical methods: ExcludeDefaults and WhereNotNull.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes ExcludeDefault came from RTVS extensions, looks like WhereNotNull is local thing

Mikhail Arkhipov (MikhailArkhipov) merged commit 4a00ee8 into microsoft:master Nov 23, 2018
Jake Bailey (jakebailey) pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL