Home ⌂Doc Index ◂Up ▴

eric6.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheck

Module implementing the syntax check for Python 3.

Global Attributes

VcsConflictMarkerRegExpList

Classes

None

Functions

__syntaxAndPyflakesCheck Function to compile one Python source file to Python bytecode and to perform a pyflakes check.
extractLineFlags Function to extract flags starting and ending with '__' from a line comment.
initBatchService Initialize the batch service and return the entry point.
initService Initialize the service and return the entry point.
normalizeCode Function to normalize the given code.
syntaxAndPyflakesBatchCheck Module function to check syntax for a batch of files.
syntaxAndPyflakesCheck Function to compile one Python source file to Python bytecode and to perform a pyflakes check.
worker Module function acting as the parallel worker for the syntax check.


__syntaxAndPyflakesCheck

__syntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False)

Function to compile one Python source file to Python bytecode and to perform a pyflakes check.

filename
source filename (string)
codestring
string containing the code to compile (string)
checkFlakes=
flag indicating to do a pyflakes check (boolean)
ignoreStarImportWarnings=
flag indicating to ignore 'star import' warnings (boolean)
Returns:
dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)
Up


extractLineFlags

extractLineFlags(line, startComment=")

Function to extract flags starting and ending with '__' from a line comment.

line
line to extract flags from (string)
startComment=
string identifying the start of the comment (string)
endComment=
string identifying the end of a comment (string)
flagsLine=
flag indicating to check for a flags only line (bool)
Returns:
list containing the extracted flags (list of strings)
Up


initBatchService

initBatchService()

Initialize the batch service and return the entry point.

Returns:
the entry point for the background client (function)
Up


initService

initService()

Initialize the service and return the entry point.

Returns:
the entry point for the background client (function)
Up


normalizeCode

normalizeCode(codestring)

Function to normalize the given code.

codestring
code to be normalized (string)
Returns:
normalized code (string)
Up


syntaxAndPyflakesBatchCheck

syntaxAndPyflakesBatchCheck(argumentsList, send, fx, cancelled, maxProcesses=0)

Module function to check syntax for a batch of files.

argumentsList (list)
list of arguments tuples as given for syntaxAndPyflakesCheck
send (func)
reference to send function
fx (str)
registered service name
cancelled (func)
reference to function checking for a cancellation
maxProcesses (int)
number of processes to be used
Up


syntaxAndPyflakesCheck

syntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False)

Function to compile one Python source file to Python bytecode and to perform a pyflakes check.

filename
source filename (string)
codestring
string containing the code to compile (string)
checkFlakes=
flag indicating to do a pyflakes check (boolean)
ignoreStarImportWarnings=
flag indicating to ignore 'star import' warnings (boolean)
Returns:
dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)
Up


worker

worker(inputQueue, outputQueue)

Module function acting as the parallel worker for the syntax check.

inputQueue
input queue (multiprocessing.Queue)
outputQueue
output queue (multiprocessing.Queue)
Up



Home ⌂Doc Index ◂Up ▴