eric5.UtilitiesPython2.Pep8Checker

Class implementing the PEP 8 checker for Python2.

Global Attributes

None

Classes

Pep8Checker Class implementing the PEP 8 checker for Python2.

Functions

None


Pep8Checker

Class implementing the PEP 8 checker for Python2.

Derived from

pep8.Checker

Class Attributes

filename
ignore
repeat
select

Class Methods

None

Methods

Pep8Checker Constructor
__ignore_code Private method to check, if the message for the given code should be ignored.
report_error_args Public method to collect the error messages.

Static Methods

None

Pep8Checker (Constructor)

Pep8Checker(filename, lines, repeat=False, select="", ignore="")

Constructor

filename
name of the file to check (string)
lines
source of the file (list of strings)
repeat=
flag indicating to repeat message categories (boolean)
select=
list of message IDs to check for (comma separated string)
ignore=
list of message IDs to ignore (comma separated string)

Pep8Checker.__ignore_code

__ignore_code(code)

Private method to check, if the message for the given code should be ignored.

If codes are selected and the code has a selected prefix and does not have an ignored prefix, it is not ignored. If codes are selected and the code does not have a selected prefix, it is ignored. If no codes are selected, the code is ignored, if it has a prefix, that is contained in the ignored codes.

code
code to be checked (string)
Returns:
flag indicating, that the code should be ignored (boolean)

Pep8Checker.report_error_args

report_error_args(line_number, offset, code, check, *args)

Public method to collect the error messages.

line_number
line number of the issue (integer)
offset
position within line of the issue (integer)
code
message code (string)
check
reference to the checker function (function)
args
arguments for the message (list)
Up