Package: python-mro-language-server
Python MRO Language ServerA simple Python language server to provideMRO(Method Resolution Order) inference.MROis the order in which Python looks for a method in a hierarchy of classes. Python usesC3 Linearisation(wiki page)as the underlying algorithm.This project conforms to Microsoft'sLanguage Server Protocolbut only support Hover and CodeLens requests. Python 3.6+ are supported.InstallationThe Python MRO language server can be easily installed by:pipinstallpython-mro-language-serverThe language server usesjedifor static syntax analysis andpython-jsonrpc-serverfor the JsonRPC communications. These two packages and their dependencies,ujsonandparso, will be installed by the about command as well.UsageThe Python MRO language server can be launched by the following command:python-mmrols.server[port]Whereportis 3000 by default if not specified.Language Server FeaturesThe main purpose of this language server is toinfer and return the MRO of a target in requestvia static syntax analysis of the provided source codes.By static syntax analysis, there is a minimum level of security risk since the source codes will not be run. This is at the expense that the inference may be incomplete in some situations, like when using a dynamically declared type or having no information about the external library. However, the user can expect that the inference should work in a large part of the common cases.The necessary static syntax analysis is achieved by using both thejedianalysis library and the Python built-in libraryast(stands for Abstract Syntax Trees). Thejedilibrary is in primary use and theastlibrary provides additional supports.Hover functionalityThe Python MRO Language Server implements theHover Requestof the Language Server Protocol. The user can fetch the MRO list of a class or its instance by hovering over the class name (implemented) or instance name (to implement very soon).CodeLens functionalityThe Python MRO Language Server implements theCode Lens Requestand theCode Lens Resolve Requestas well. A code lens will appear at the first line of every class declaration. The user can get the MRO list of the declared class by clicking the code lens.Relation to the Python MRO extension for VS CodeThis language server is the backend server used in thePython MROextension for VS Code.It is very welcomed that this language server can be used in any other extensions to any editor that supports the Language Server Protocol.Incoming FeaturesThe following list includes the features to add into the Python MRO Language Server in the next releases.New Features:Hover:add support to show MRO list when hovering over a class instanceadd support to show the which class in the MRO list will provide the actual implementation when hovering over a method of a class instance (lower priority, scheduled after finishing the other features)CodeLens:change the way to show MRO list when clicking a code lens from showing in a pop-up message window to showing in a side panel likewhat GitLens does.Project Reliabilityincrease the readability of the documentationsadd coverage check and show the result as a badge in READMEadd pylint check and show the score as a badge in READMEadd logging to the whole scope of the project and save the last logs in fileContributionAny contribution is welcomed!