VS Code Extension: Python MROA Visual Studio Code Extension to show the inferred Method Resolution Order (MRO) list of a Python class/object via Hover or CodeLens by leveraging the functionality of the Python MRO Language Server. MRO is the order in which Python looks for a method in a hierarchy of classes. Python uses C3 Linearisation (wiki page) as the underlying algorithm. FeaturesThis extension takes the advantage of Hover and CodeLens to conveniently show the inferred MRO list in VS Code. Moreover, the extension listens to the documentation changes so can take the unsaved changes into account during the MRO inference. Showing the MRO list via HoverUltimately, the extension aims to provide useful MRO information when user hovers over an entity in the editor. For example, the extension aims to show the MRO list when hovering over a class instance, or to show the order list of the parent classes which actually implements the method under hover. Currently, this extension is able to show the MRO list when user hovers over the declared class name in its declaration section. Showing the MRO list via CodeLensUltimately, the extension aims to provide the MRO list for each user-declared class by a CodeLens at the start of the declaration section. The user can view the MRO list in a side panel by clicking the CodeLens, which works like the GitLens. Currently, the MRO list will show in a pop-up message window at the right-bottom corner of the editor, but this will be upgraded to the mentioned side panel in a next release very soon. Requirements - Python MRO Language ServerPlease use the following command to install the
UsageThis extension will automatically launch when a Python file is open. It will also automatically launch a Python MRO Language Server during its launch process. Extension SettingsCurrently there is no setting option available to the user. But they will become available in the next releases. Release NotesPlease refer to the CHANGELOG. Incoming FeaturesThe following list includes the features to add into the Python MRO extension in the next releases.
ContributionAny contribution is welcomed! |