This package contains a series of python specific modes (calltips, autoindent, code linting,...).
Bases: builtins.object
Defines an assignment. Used by GoToAssignmentsMode.
Column number
Assignement full name
Line number
File path of the module where the assignment can be found
Bases: pyqode.core.api.mode.Mode
Comments/uncomments a set of lines using Ctrl+/.
Comments/Uncomments the selected lines or the current lines if there is no selection.
Called when the mode is activated/deactivated
Bases: pyqode.core.api.mode.Mode, PyQt5.QtCore.QObject
Analyses the document outline as a tree of statements.
This mode analyses the structure of a document (a tree of pyqode.python.backend.workers.Definition.
pyqode.python.modes.DocumentAnalyserMode.document_changed is emitted whenever the document structure changed.
To keep good performances, the analysis task is run when the application is idle for more than 1 second (by default).
Returns the results as a list of top level QTreeWidgetItem.
This is a convenience function that you can use to update a document tree widget wheneve the document changed.
Signal emitted when the document structure changed.
Flattens the document structure tree as a simple sequential list.
The list of results (elements might have children; this is actually a tree).
Bases: pyqode.core.modes.checker.CheckerMode
Runs pyflakes on you code while you’re typing
This checker mode runs pyflakes on the fly to check your python syntax.
Bases: pyqode.core.modes.wordclick.WordClickMode
Goes to the assignments (using jedi.Script.goto_assignments) when the user execute the shortcut or click word. If there are more than one assignments, an input dialog is used to ask the user to choose the desired assignment.
This mode will emit the out_of_doc signal if the definition can not be reached in the current document. IDE will typically connects a slot that open a new editor tab and goes to the definition position.
Request a goto action for the word under the text cursor.
Signal emitted when no results could be found.
Signal emitted when the definition cannot be reached in the current document
Bases: pyqode.core.modes.checker.CheckerMode
This checker mode runs pep8.py on the fly to check your python style.
Bases: pyqode.core.modes.autocomplete.AutoCompleteMode
Auto complete parentheses and method definitions.
Extends pyqode.core.modes.AutoCompleteMode to add support for method/function call:
- function completion adds ”):” to the function definition.
- method completion adds “self):” to the method definition.
Bases: pyqode.core.modes.autoindent.AutoIndentMode
Automatically indents text, respecting the PEP8 conventions.
Customised pyqode.core.modes.AutoIndentMode for python that tries its best to follow the pep8 indentation guidelines.
Bases: pyqode.core.modes.indenter.IndenterMode
Extends the core indenter to add the ability to always indent the whole line instead of inserting a tab at the cursor position. This behaviour can be turned off at runtime by setting tab_always_indent to False.
Performs an indentation
Performs an un-indentation
When this flag is set to True, any call to indent will indent the whole line instead of inserting a tab at the cursor position.
Bases: pyqode.core.api.syntax_highlighter.SyntaxHighlighter
Highlights python syntax in the editor.