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

mark abstract functions as such#191

Merged
MikhailArkhipov merged 1 commit into
microsoft:masterfrom
losttech:features/AbstractFunctions
Oct 4, 2018
Merged

mark abstract functions as such#191
MikhailArkhipov merged 1 commit into
microsoft:masterfrom
losttech:features/AbstractFunctions

Conversation

@lostmsu
Copy link
Copy Markdown
Contributor

@lostmsu lostmsu commented Oct 4, 2018

Adds IsAbstract property to IFunctionInfo and FunctionInfo, that tells if the function is abstract or not.

Note: should we consider using tri-state bool? here? During analysis, until all decorators are analyzed, IsAbstract may return false, when the final analysis result will be true (it is the case right now, as in many cases imports of abc are processed after functions).

bool IsClassMethod { get; }
bool IsProperty { get; }
bool IsClosure { get; }
bool IsAbstract { get; }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since these are public interfaces you may have to create IFunctionInfo2 deriving from IFunctionInfo and add property there. This way code that uses public LS extensibility API will continue working. Yes, there is at least one VS Code extension that uses the API.

@lostmsu lostmsu force-pushed the features/AbstractFunctions branch from b767c51 to 14ca3e4 Compare October 4, 2018 21:13
@lostmsu
Copy link
Copy Markdown
Contributor Author

lostmsu commented Oct 4, 2018

@MikhailArkhipov , makes sense, updated with IFunctionInfo2.

@lostmsu
Copy link
Copy Markdown
Contributor Author

lostmsu commented Oct 4, 2018

@MikhailArkhipov , any thoughts on tri-state?

@MikhailArkhipov MikhailArkhipov merged commit 044a70d into microsoft:master Oct 4, 2018
jakebailey pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
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