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> |
|
34 <td>Class implementing the PEP 8 checker.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#Pep8Py2Checker">Pep8Py2Checker</a></td> |
33 <td><a href="#Pep8Py2Checker">Pep8Py2Checker</a></td> |
37 <td>Class implementing the PEP 8 checker interface for Python 2.</td> |
34 <td>Class implementing the PEP 8 checker interface for Python 2.</td> |
38 </tr> |
35 </tr> |
39 </table> |
36 </table> |
40 <h3>Functions</h3> |
37 <h3>Functions</h3> |
41 <table> |
38 <table> |
42 <tr><td>None</td></tr> |
39 <tr><td>None</td></tr> |
43 </table> |
40 </table> |
44 <hr /><hr /> |
|
45 <a NAME="Pep8Checker" ID="Pep8Checker"></a> |
|
46 <h2>Pep8Checker</h2> |
|
47 <p> |
|
48 Class implementing the PEP 8 checker. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 pep8.Checker |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>None</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#Pep8Checker.__init__">Pep8Checker</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#Pep8Checker.__ignore_code">__ignore_code</a></td> |
|
67 <td>Private method to check, if the message for the given code should be ignored.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#Pep8Checker.report_error_args">report_error_args</a></td> |
|
70 <td>Public method to collect the error messages.</td> |
|
71 </tr> |
|
72 </table> |
|
73 <h3>Static Methods</h3> |
|
74 <table> |
|
75 <tr><td>None</td></tr> |
|
76 </table> |
|
77 <a NAME="Pep8Checker.__init__" ID="Pep8Checker.__init__"></a> |
|
78 <h4>Pep8Checker (Constructor)</h4> |
|
79 <b>Pep8Checker</b>(<i>filename, lines, repeat=False, select="", ignore=""</i>) |
|
80 <p> |
|
81 Constructor |
|
82 </p><dl> |
|
83 <dt><i>filename</i></dt> |
|
84 <dd> |
|
85 name of the file to check (string) |
|
86 </dd><dt><i>lines</i></dt> |
|
87 <dd> |
|
88 source of the file (list of strings) |
|
89 </dd><dt><i>repeat=</i></dt> |
|
90 <dd> |
|
91 flag indicating to repeat message categories (boolean) |
|
92 </dd><dt><i>select=</i></dt> |
|
93 <dd> |
|
94 list of message IDs to check for |
|
95 (comma separated string) |
|
96 </dd><dt><i>ignore=</i></dt> |
|
97 <dd> |
|
98 list of message IDs to ignore |
|
99 (comma separated string) |
|
100 </dd> |
|
101 </dl><a NAME="Pep8Checker.__ignore_code" ID="Pep8Checker.__ignore_code"></a> |
|
102 <h4>Pep8Checker.__ignore_code</h4> |
|
103 <b>__ignore_code</b>(<i>code</i>) |
|
104 <p> |
|
105 Private method to check, if the message for the given code should |
|
106 be ignored. |
|
107 </p><p> |
|
108 If codes are selected and the code has a selected prefix and does not |
|
109 have an ignored prefix, it is not ignored. If codes are selected and |
|
110 the code does not have a selected prefix, it is ignored. If no codes |
|
111 are selected, the code is ignored, if it has a prefix, that is |
|
112 contained in the ignored codes. |
|
113 </p><dl> |
|
114 <dt><i>code</i></dt> |
|
115 <dd> |
|
116 code to be checked (string) |
|
117 </dd> |
|
118 </dl><dl> |
|
119 <dt>Returns:</dt> |
|
120 <dd> |
|
121 flag indicating, that the code should be ignored (boolean) |
|
122 </dd> |
|
123 </dl><a NAME="Pep8Checker.report_error_args" ID="Pep8Checker.report_error_args"></a> |
|
124 <h4>Pep8Checker.report_error_args</h4> |
|
125 <b>report_error_args</b>(<i>line_number, offset, code, check, *args</i>) |
|
126 <p> |
|
127 Public method to collect the error messages. |
|
128 </p><dl> |
|
129 <dt><i>line_number</i></dt> |
|
130 <dd> |
|
131 line number of the issue (integer) |
|
132 </dd><dt><i>offset</i></dt> |
|
133 <dd> |
|
134 position within line of the issue (integer) |
|
135 </dd><dt><i>code</i></dt> |
|
136 <dd> |
|
137 message code (string) |
|
138 </dd><dt><i>check</i></dt> |
|
139 <dd> |
|
140 reference to the checker function (function) |
|
141 </dd><dt><i>args</i></dt> |
|
142 <dd> |
|
143 arguments for the message (list) |
|
144 </dd> |
|
145 </dl> |
|
146 <div align="right"><a href="#top">Up</a></div> |
|
147 <hr /><hr /> |
41 <hr /><hr /> |
148 <a NAME="Pep8Py2Checker" ID="Pep8Py2Checker"></a> |
42 <a NAME="Pep8Py2Checker" ID="Pep8Py2Checker"></a> |
149 <h2>Pep8Py2Checker</h2> |
43 <h2>Pep8Py2Checker</h2> |
150 <p> |
44 <p> |
151 Class implementing the PEP 8 checker interface for Python 2. |
45 Class implementing the PEP 8 checker interface for Python 2. |