25 """ |
25 """ |
26 Class implementing the PEP 8 checker interface for Python 2. |
26 Class implementing the PEP 8 checker interface for Python 2. |
27 """ |
27 """ |
28 def __init__(self, filename, lines, repeat=False, |
28 def __init__(self, filename, lines, repeat=False, |
29 select="", ignore="", max_line_length=79, |
29 select="", ignore="", max_line_length=79, |
30 hang_closing=False): |
30 hang_closing=False, docType="pep257"): |
31 """ |
31 """ |
32 Constructor |
32 Constructor |
33 |
33 |
34 @param filename name of the file to check (string) |
34 @param filename name of the file to check (string) |
35 @param lines source of the file (list of strings) (ignored) |
35 @param lines source of the file (list of strings) (ignored) |
39 @keyparam ignore list of message IDs to ignore |
39 @keyparam ignore list of message IDs to ignore |
40 (comma separated string) |
40 (comma separated string) |
41 @keyparam max_line_length maximum allowed line length (integer) |
41 @keyparam max_line_length maximum allowed line length (integer) |
42 @keyparam hang_closing flag indicating to allow hanging closing |
42 @keyparam hang_closing flag indicating to allow hanging closing |
43 brackets (boolean) |
43 brackets (boolean) |
|
44 @keyparam docType type of the documentation strings |
|
45 (string, one of 'eric' or 'pep257') |
44 """ |
46 """ |
|
47 assert docType in ("eric", "pep257") |
|
48 |
45 self.errors = [] |
49 self.errors = [] |
46 self.counters = {} |
50 self.counters = {} |
47 |
51 |
48 interpreter = Preferences.getDebugger("PythonInterpreter") |
52 interpreter = Preferences.getDebugger("PythonInterpreter") |
49 if interpreter == "" or not Utilities.isExecutable(interpreter): |
53 if interpreter == "" or not Utilities.isExecutable(interpreter): |