PythonCodeCompletionProviderCommon
This class represents a base class for Python code completion providers
It partially implements the IExternalCodeCompletionProviderCore interface and
contains a collection of utility functions/properties that are common among existing code completion provider classes
Maps a basic variable regex to a basic python type.
Keeps track of failed statements to avoid poluting the log
Tracks already referenced CLR modules
protected PythonCodeCompletionProviderCommon()
Attempts to find all import statements in the code
Detect all library references given the provided code
Returns the first possible type name from the type's declaration line.
Returns the last name from the input line. The regex ignores tabs, spaces, the first new line, etc.
Returns the entire namespace from the end of the input line. The regex ignores tabs, spaces, the first new line, etc.
Removes any docstring characters from the source code
Check if a full type name is found in one of the known pre-loaded assemblies and return the type
protected IEnumerable<Tuple<string, string, bool, ExternalCodeCompletionType>> EnumerateMembers(Type type, string name)
List all of the members in a CLR type
Attempts to find all variable assignments in the code. Has basic variable unpacking support.
We don't need to check the line indices because regex matches are ordered as per the code.
Try to generate a description from a typename.
Retrieves the clr Type corresponding to the input paramater name