28 <tr><td>None</td></tr> |
28 <tr><td>None</td></tr> |
29 </table> |
29 </table> |
30 <h3>Classes</h3> |
30 <h3>Classes</h3> |
31 <table> |
31 <table> |
32 <tr> |
32 <tr> |
33 <td><a href="#Pep8Checker">Pep8Checker</a></td> |
33 <td><a href="#Pep8Report">Pep8Report</a></td> |
34 <td>Class implementing the PEP 8 checker for Python2.</td> |
34 <td>Class implementing a special report to be used with our dialog.</td> |
35 </tr> |
35 </tr> |
36 </table> |
36 </table> |
37 <h3>Functions</h3> |
37 <h3>Functions</h3> |
38 <table> |
38 <table> |
39 <tr><td>None</td></tr> |
39 <tr><td>None</td></tr> |
40 </table> |
40 </table> |
41 <hr /><hr /> |
41 <hr /><hr /> |
42 <a NAME="Pep8Checker" ID="Pep8Checker"></a> |
42 <a NAME="Pep8Report" ID="Pep8Report"></a> |
43 <h2>Pep8Checker</h2> |
43 <h2>Pep8Report</h2> |
44 <p> |
44 <p> |
45 Class implementing the PEP 8 checker for Python2. |
45 Class implementing a special report to be used with our dialog. |
46 </p> |
46 </p> |
47 <h3>Derived from</h3> |
47 <h3>Derived from</h3> |
48 pep8.Checker |
48 pep8.BaseReport |
49 <h3>Class Attributes</h3> |
49 <h3>Class Attributes</h3> |
50 <table> |
50 <table> |
51 <tr><td>filename</td></tr><tr><td>ignore</td></tr><tr><td>repeat</td></tr><tr><td>select</td></tr> |
51 <tr><td>filename</td></tr><tr><td>hang_closing</td></tr><tr><td>ignore</td></tr><tr><td>max_line_length</td></tr><tr><td>repeat</td></tr><tr><td>select</td></tr> |
52 </table> |
52 </table> |
53 <h3>Class Methods</h3> |
53 <h3>Class Methods</h3> |
54 <table> |
54 <table> |
55 <tr><td>None</td></tr> |
55 <tr><td>None</td></tr> |
56 </table> |
56 </table> |
57 <h3>Methods</h3> |
57 <h3>Methods</h3> |
58 <table> |
58 <table> |
59 <tr> |
59 <tr> |
60 <td><a href="#Pep8Checker.__init__">Pep8Checker</a></td> |
60 <td><a href="#Pep8Report.__init__">Pep8Report</a></td> |
61 <td>Constructor</td> |
61 <td>Constructor</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#Pep8Checker.__ignore_code">__ignore_code</a></td> |
63 <td><a href="#Pep8Report.error_args">error_args</a></td> |
64 <td>Private method to check, if the message for the given code should be ignored.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#Pep8Checker.report_error_args">report_error_args</a></td> |
|
67 <td>Public method to collect the error messages.</td> |
64 <td>Public method to collect the error messages.</td> |
68 </tr> |
65 </tr> |
69 </table> |
66 </table> |
70 <h3>Static Methods</h3> |
67 <h3>Static Methods</h3> |
71 <table> |
68 <table> |
72 <tr><td>None</td></tr> |
69 <tr><td>None</td></tr> |
73 </table> |
70 </table> |
74 <a NAME="Pep8Checker.__init__" ID="Pep8Checker.__init__"></a> |
71 <a NAME="Pep8Report.__init__" ID="Pep8Report.__init__"></a> |
75 <h4>Pep8Checker (Constructor)</h4> |
72 <h4>Pep8Report (Constructor)</h4> |
76 <b>Pep8Checker</b>(<i>filename, lines, repeat=False, select="", ignore=""</i>) |
73 <b>Pep8Report</b>(<i>options</i>) |
77 <p> |
74 <p> |
78 Constructor |
75 Constructor |
79 </p><dl> |
76 </p><dl> |
80 <dt><i>filename</i></dt> |
77 <dt><i>options</i></dt> |
81 <dd> |
78 <dd> |
82 name of the file to check (string) |
79 options for the report (optparse.Values) |
83 </dd><dt><i>lines</i></dt> |
|
84 <dd> |
|
85 source of the file (list of strings) |
|
86 </dd><dt><i>repeat=</i></dt> |
|
87 <dd> |
|
88 flag indicating to repeat message categories (boolean) |
|
89 </dd><dt><i>select=</i></dt> |
|
90 <dd> |
|
91 list of message IDs to check for |
|
92 (comma separated string) |
|
93 </dd><dt><i>ignore=</i></dt> |
|
94 <dd> |
|
95 list of message IDs to ignore |
|
96 (comma separated string) |
|
97 </dd> |
80 </dd> |
98 </dl><a NAME="Pep8Checker.__ignore_code" ID="Pep8Checker.__ignore_code"></a> |
81 </dl><a NAME="Pep8Report.error_args" ID="Pep8Report.error_args"></a> |
99 <h4>Pep8Checker.__ignore_code</h4> |
82 <h4>Pep8Report.error_args</h4> |
100 <b>__ignore_code</b>(<i>code</i>) |
83 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>) |
101 <p> |
|
102 Private method to check, if the message for the given code should |
|
103 be ignored. |
|
104 </p><p> |
|
105 If codes are selected and the code has a selected prefix and does not |
|
106 have an ignored prefix, it is not ignored. If codes are selected and |
|
107 the code does not have a selected prefix, it is ignored. If no codes |
|
108 are selected, the code is ignored, if it has a prefix, that is |
|
109 contained in the ignored codes. |
|
110 </p><dl> |
|
111 <dt><i>code</i></dt> |
|
112 <dd> |
|
113 code to be checked (string) |
|
114 </dd> |
|
115 </dl><dl> |
|
116 <dt>Returns:</dt> |
|
117 <dd> |
|
118 flag indicating, that the code should be ignored (boolean) |
|
119 </dd> |
|
120 </dl><a NAME="Pep8Checker.report_error_args" ID="Pep8Checker.report_error_args"></a> |
|
121 <h4>Pep8Checker.report_error_args</h4> |
|
122 <b>report_error_args</b>(<i>line_number, offset, code, check, *args</i>) |
|
123 <p> |
84 <p> |
124 Public method to collect the error messages. |
85 Public method to collect the error messages. |
125 </p><dl> |
86 </p><dl> |
126 <dt><i>line_number</i></dt> |
87 <dt><i>line_number</i></dt> |
127 <dd> |
88 <dd> |