eric7.Plugins.CheckerPlugins.SyntaxChecker.pyCheckSyntax
Module implementing the syntax check for Python 3.
Global Attributes
VcsConflictMarkerRegExpList |
Classes
Functions
__pySyntaxAndPyflakesCheck
__pySyntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False, additionalBuiltins=None, )
Function to compile one Python source file to Python bytecode
and to perform a pyflakes check.
- filename (str)
-
source filename
- codestring (str)
-
string containing the code to compile
- checkFlakes (bool)
-
flag indicating to do a pyflakes check
- ignoreStarImportWarnings (bool)
-
flag indicating to
ignore 'star import' warnings
- additionalBuiltins (list of str)
-
list of names pyflakes should consider as builtins
- Return:
-
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)
- Return Type:
-
dict
extractLineFlags
extractLineFlags(line, startComment=")
Function to extract flags starting and ending with '__' from a line
comment.
- line (str)
-
line to extract flags from
- startComment (str)
-
string identifying the start of the comment
- endComment (str)
-
string identifying the end of a comment
- flagsLine (bool)
-
flag indicating to check for a flags only line
- Return:
-
list containing the extracted flags
- Return Type:
-
list of str
initBatchService
initBatchService()
Initialize the batch service and return the entry point.
- Return:
-
the entry point for the background client
- Return Type:
-
function
initService
initService()
Initialize the service and return the entry point.
- Return:
-
the entry point for the background client
- Return Type:
-
function
pySyntaxAndPyflakesBatchCheck
pySyntaxAndPyflakesBatchCheck(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 pySyntaxAndPyflakesCheck
- 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
pySyntaxAndPyflakesCheck
pySyntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False, additionalBuiltins=None, )
Function to compile one Python source file to Python bytecode
and to perform a pyflakes check.
- filename (str)
-
source filename
- codestring (str)
-
string containing the code to compile
- checkFlakes (bool)
-
flag indicating to do a pyflakes check
- ignoreStarImportWarnings (bool)
-
flag indicating to ignore 'star import' warnings
- additionalBuiltins (list of str)
-
list of names pyflakes should consider as builtins
- Return:
-
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)
- Return Type:
-
dict
workerTask
workerTask(inputQueue, outputQueue)
Module function acting as the parallel worker for the syntax check.
- inputQueue (multiprocessing.Queue)
-
input queue
- outputQueue (multiprocessing.Queue)
-
output queue