eric7.QScintilla.TypingCompleters.CompleterPython

Module implementing a typing completer for Python.

Global Attributes

None

Classes

CompleterPython Class implementing typing completer for Python.

Functions

createCompleter Function to instantiate a typing completer object.


CompleterPython

Class implementing typing completer for Python.

Derived from

CompleterBase

Class Attributes

None

Class Methods

None

Methods

CompleterPython Constructor
__dedentDefStatement Private method to dedent the line of the def statement to a previous def statement or class statement.
__dedentElseToIfWhileForTry Private method to dedent the line of the else statement to the last if, while, for or try statement with less (or equal) indentation.
__dedentExceptToTry Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.
__dedentFinallyToTry Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.
__dedentToIf Private method to dedent the last line to the last if statement with less (or equal) indentation.
__inComment Private method to check, if the cursor is inside a comment.
__inDoubleQuotedString Private method to check, if the cursor is within a double quoted string.
__inSingleQuotedString Private method to check, if the cursor is within a single quoted string.
__inTripleDoubleQuotedString Private method to check, if the cursor is within a triple double quoted string.
__inTripleSingleQuotedString Private method to check, if the cursor is within a triple single quoted string.
__isClassMethod Private method to check, if the user is defining a class method.
__isClassMethodDef Private method to check, if the user is defing a class method (@classmethod).
__isStaticMethodDef Private method to check, if the user is defing a static method (@staticmethod) method.
charAdded Public slot called to handle the user entering a character.
readSettings Public slot called to reread the configuration parameters.

Static Methods

None

CompleterPython (Constructor)

CompleterPython(editor, parent=None)

Constructor

editor (QScintilla.Editor)
reference to the editor object
parent (QObject)
reference to the parent object

CompleterPython.__dedentDefStatement

__dedentDefStatement()

Private method to dedent the line of the def statement to a previous def statement or class statement.

CompleterPython.__dedentElseToIfWhileForTry

__dedentElseToIfWhileForTry()

Private method to dedent the line of the else statement to the last if, while, for or try statement with less (or equal) indentation.

CompleterPython.__dedentExceptToTry

__dedentExceptToTry()

Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.

CompleterPython.__dedentFinallyToTry

__dedentFinallyToTry()

Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.

CompleterPython.__dedentToIf

__dedentToIf()

Private method to dedent the last line to the last if statement with less (or equal) indentation.

CompleterPython.__inComment

__inComment(line, col)

Private method to check, if the cursor is inside a comment.

line (int)
current line
col (int)
current position within line
Return:
flag indicating, if the cursor is inside a comment
Return Type:
bool

CompleterPython.__inDoubleQuotedString

__inDoubleQuotedString()

Private method to check, if the cursor is within a double quoted string.

Return:
flag indicating, if the cursor is inside a double quoted string
Return Type:
bool

CompleterPython.__inSingleQuotedString

__inSingleQuotedString()

Private method to check, if the cursor is within a single quoted string.

Return:
flag indicating, if the cursor is inside a single quoted string
Return Type:
bool

CompleterPython.__inTripleDoubleQuotedString

__inTripleDoubleQuotedString()

Private method to check, if the cursor is within a triple double quoted string.

Return:
flag indicating, if the cursor is inside a triple double quoted string
Return Type:
bool

CompleterPython.__inTripleSingleQuotedString

__inTripleSingleQuotedString()

Private method to check, if the cursor is within a triple single quoted string.

Return:
flag indicating, if the cursor is inside a triple single quoted string
Return Type:
bool

CompleterPython.__isClassMethod

__isClassMethod()

Private method to check, if the user is defining a class method.

Return:
flag indicating the definition of a class method
Return Type:
bool

CompleterPython.__isClassMethodDef

__isClassMethodDef()

Private method to check, if the user is defing a class method (@classmethod).

Return:
flag indicating the definition of a class method
Return Type:
bool

CompleterPython.__isStaticMethodDef

__isStaticMethodDef()

Private method to check, if the user is defing a static method (@staticmethod) method.

Return:
flag indicating the definition of a static method
Return Type:
bool

CompleterPython.charAdded

charAdded(charNumber)

Public slot called to handle the user entering a character.

charNumber (int)
value of the character entered

CompleterPython.readSettings

readSettings()

Public slot called to reread the configuration parameters.

Up


createCompleter

createCompleter(editor, parent=None)

Function to instantiate a typing completer object.

editor (QScintilla.Editor)
reference to the editor object
parent (QObject (optional))
reference to the parent object (defaults to None)
Return:
reference to the instantiated typing completer object
Return Type:
CompleterPython
Up