eric5.UtilitiesPython2.Pep8Checker
Class implementing the PEP 8 checker for Python2.
Global Attributes
Classes
Pep8Checker |
Class implementing the PEP 8 checker for Python2. |
Functions
Pep8Checker
Class implementing the PEP 8 checker for Python2.
Derived from
pep8.Checker
Class Attributes
filename |
ignore |
repeat |
select |
Class Methods
Methods
Static Methods
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)