pyqode.python package

Submodules

pyqode.python.folding module

This module contains the python code fold detector.

class pyqode.python.folding.PythonFoldDetector[source]

Bases: pyqode.core.api.folding.IndentFoldDetector

Python specific fold detector.

Python is an indent based language so we use indentation for detecting the outline but we discard regions with higher indentation if they do not follow a trailing ‘:’. That way, only the real logical blocks are displayed.

We also add some trickery to make import regions and docstring appear with an higher fold level than they should be (in order to make them foldable).

detect_fold_level(prev_block, block)[source]

Perfoms fold level detection for current block (take previous block into account).

Parameters:
  • prev_block – previous block, None if block is the first block.
  • block – block to analyse.
Returns:

block fold level

Module contents

pyqode.python is an extension of pyqode.core that brings support for the python programming language. It provides a set of additional modes and panels for the frontend and a series of worker for the backend (code completion, documentation lookups, code linters, and so on...).

Table Of Contents

Previous topic

Welcome to pyqode.python’s API reference documentation!

Next topic

pyqode.python.backend package