Documentation/Source/eric5.Plugins.CheckerPlugins.Pep8.Pep8Checker.html

branch
Py2 comp.
changeset 2911
ce77f0b1ee67
parent 2680
110ac646a3a0
parent 2867
eb325d7f7335
child 3056
9986ec0e559a
equal deleted inserted replaced
2847:1843ef6e2656 2911:ce77f0b1ee67
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="#Pep8Py2Checker">Pep8Py2Checker</a></td>
34 <td>Class implementing the PEP 8 checker.</td> 34 <td>Class implementing the PEP 8 checker interface for Python 2.</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="Pep8Py2Checker" ID="Pep8Py2Checker"></a>
43 <h2>Pep8Checker</h2> 43 <h2>Pep8Py2Checker</h2>
44 <p> 44 <p>
45 Class implementing the PEP 8 checker. 45 Class implementing the PEP 8 checker interface for Python 2.
46 </p> 46 </p>
47 <h3>Derived from</h3> 47 <h3>Derived from</h3>
48 pep8.Checker 48 object
49 <h3>Class Attributes</h3> 49 <h3>Class Attributes</h3>
50 <table> 50 <table>
51 <tr><td>None</td></tr> 51 <tr><td>None</td></tr>
52 </table> 52 </table>
53 <h3>Class Methods</h3> 53 <h3>Class Methods</h3>
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="#Pep8Py2Checker.__init__">Pep8Py2Checker</a></td>
61 <td>Constructor</td> 61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#Pep8Checker.__ignore_code">__ignore_code</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>
68 </tr> 62 </tr>
69 </table> 63 </table>
70 <h3>Static Methods</h3> 64 <h3>Static Methods</h3>
71 <table> 65 <table>
72 <tr><td>None</td></tr> 66 <tr><td>None</td></tr>
73 </table> 67 </table>
74 <a NAME="Pep8Checker.__init__" ID="Pep8Checker.__init__"></a> 68 <a NAME="Pep8Py2Checker.__init__" ID="Pep8Py2Checker.__init__"></a>
75 <h4>Pep8Checker (Constructor)</h4> 69 <h4>Pep8Py2Checker (Constructor)</h4>
76 <b>Pep8Checker</b>(<i>filename, lines, repeat=False, select="", ignore=""</i>) 70 <b>Pep8Py2Checker</b>(<i>filename, lines, repeat=False, select="", ignore="", max_line_length=79, hang_closing=False</i>)
77 <p> 71 <p>
78 Constructor 72 Constructor
79 </p><dl> 73 </p><dl>
80 <dt><i>filename</i></dt> 74 <dt><i>filename</i></dt>
81 <dd> 75 <dd>
82 name of the file to check (string) 76 name of the file to check (string)
83 </dd><dt><i>lines</i></dt> 77 </dd><dt><i>lines</i></dt>
84 <dd> 78 <dd>
85 source of the file (list of strings) 79 source of the file (list of strings) (ignored)
86 </dd><dt><i>repeat=</i></dt> 80 </dd><dt><i>repeat=</i></dt>
87 <dd> 81 <dd>
88 flag indicating to repeat message categories (boolean) 82 flag indicating to repeat message categories (boolean)
89 </dd><dt><i>select=</i></dt> 83 </dd><dt><i>select=</i></dt>
90 <dd> 84 <dd>
92 (comma separated string) 86 (comma separated string)
93 </dd><dt><i>ignore=</i></dt> 87 </dd><dt><i>ignore=</i></dt>
94 <dd> 88 <dd>
95 list of message IDs to ignore 89 list of message IDs to ignore
96 (comma separated string) 90 (comma separated string)
97 </dd> 91 </dd><dt><i>max_line_length=</i></dt>
98 </dl><a NAME="Pep8Checker.__ignore_code" ID="Pep8Checker.__ignore_code"></a>
99 <h4>Pep8Checker.__ignore_code</h4>
100 <b>__ignore_code</b>(<i>code</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> 92 <dd>
113 code to be checked (string) 93 maximum allowed line length (integer)
114 </dd> 94 </dd><dt><i>hang_closing=</i></dt>
115 </dl><dl>
116 <dt>Returns:</dt>
117 <dd> 95 <dd>
118 flag indicating, that the code should be ignored (boolean) 96 flag indicating to allow hanging closing brackets (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>
124 Public method to collect the error messages.
125 </p><dl>
126 <dt><i>line_number</i></dt>
127 <dd>
128 line number of the issue (integer)
129 </dd><dt><i>offset</i></dt>
130 <dd>
131 position within line of the issue (integer)
132 </dd><dt><i>code</i></dt>
133 <dd>
134 message code (string)
135 </dd><dt><i>check</i></dt>
136 <dd>
137 reference to the checker function (function)
138 </dd><dt><i>args</i></dt>
139 <dd>
140 arguments for the message (list)
141 </dd> 97 </dd>
142 </dl> 98 </dl>
143 <div align="right"><a href="#top">Up</a></div> 99 <div align="right"><a href="#top">Up</a></div>
144 <hr /> 100 <hr />
145 </body></html> 101 </body></html>

eric ide

mercurial