Documentation/Source/eric5.UtilitiesPython2.Pep8Checker.html

changeset 845
0e937d523b70
child 1228
7afaf2fca55b
child 1278
fb0460fd00b9
equal deleted inserted replaced
844:9508a1f87bc3 845:0e937d523b70
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric5.UtilitiesPython2.Pep8Checker</title>
6 <style>
7 body {
8 background: #EDECE6;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #85774A; }
14 h2 { color: white; background: #85774A; }
15 h3 { color: white; background: #9D936E; }
16 h4 { color: white; background: #9D936E; }
17
18 a { color: #BA6D36; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.UtilitiesPython2.Pep8Checker</h1>
24 <p>
25 Class implementing the PEP 8 checker for Python2.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#Pep8Checker">Pep8Checker</a></td>
35 <td>Class implementing the PEP 8 checker for Python2.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="Pep8Checker" ID="Pep8Checker"></a>
44 <h2>Pep8Checker</h2>
45 <p>
46 Class implementing the PEP 8 checker for Python2.
47 </p>
48 <h3>Derived from</h3>
49 pep8.Checker
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>filename</td></tr><tr><td>ignore</td></tr><tr><td>repeat</td></tr><tr><td>select</td></tr>
53 </table>
54 <h3>Methods</h3>
55 <table>
56 <tr>
57 <td><a href="#Pep8Checker.__init__">Pep8Checker</a></td>
58 <td>Constructor</td>
59 </tr><tr>
60 <td><a href="#Pep8Checker.__ignore_code">__ignore_code</a></td>
61 <td>Private method to check, if the message for the given code should be ignored.</td>
62 </tr><tr>
63 <td><a href="#Pep8Checker.report_error_args">report_error_args</a></td>
64 <td>Public method to collect the error messages.</td>
65 </tr>
66 </table>
67 <a NAME="Pep8Checker.__init__" ID="Pep8Checker.__init__"></a>
68 <h4>Pep8Checker (Constructor)</h4>
69 <b>Pep8Checker</b>(<i>filename, lines, repeat=False, select="", ignore=""</i>)
70 <p>
71 Constructor
72 </p><dl>
73 <dt><i>filename</i></dt>
74 <dd>
75 name of the file to check (string)
76 </dd><dt><i>lines</i></dt>
77 <dd>
78 source of the file (list of strings)
79 </dd><dt><i>repeat=</i></dt>
80 <dd>
81 flag indicating to repeat message categories (boolean)
82 </dd><dt><i>select=</i></dt>
83 <dd>
84 list of message IDs to check for
85 (comma separated string)
86 </dd><dt><i>ignore=</i></dt>
87 <dd>
88 list of message IDs to ignore
89 (comma separated string)
90 </dd>
91 </dl><a NAME="Pep8Checker.__ignore_code" ID="Pep8Checker.__ignore_code"></a>
92 <h4>Pep8Checker.__ignore_code</h4>
93 <b>__ignore_code</b>(<i>code</i>)
94 <p>
95 Private method to check, if the message for the given code should
96 be ignored.
97 </p><p>
98 If codes are selected and the code has a selected prefix and does not
99 have an ignored prefix, it is not ignored. If codes are selected and
100 the code does not have a selected prefix, it is ignored. If no codes
101 are selected, the code is ignored, if it has a prefix, that is
102 contained in the ignored codes.
103 </p><dl>
104 <dt><i>code</i></dt>
105 <dd>
106 code to be checked (string)
107 </dd>
108 </dl><dl>
109 <dt>Returns:</dt>
110 <dd>
111 flag indicating, that the code should be ignored (boolean)
112 </dd>
113 </dl><a NAME="Pep8Checker.report_error_args" ID="Pep8Checker.report_error_args"></a>
114 <h4>Pep8Checker.report_error_args</h4>
115 <b>report_error_args</b>(<i>line_number, offset, code, check, *args</i>)
116 <p>
117 Public method to collect the error messages.
118 </p><dl>
119 <dt><i>line_number</i></dt>
120 <dd>
121 line number of the issue (integer)
122 </dd><dt><i>offset</i></dt>
123 <dd>
124 position within line of the issue (integer)
125 </dd><dt><i>code</i></dt>
126 <dd>
127 message code (string)
128 </dd><dt><i>check</i></dt>
129 <dd>
130 reference to the checker function (function)
131 </dd><dt><i>args</i></dt>
132 <dd>
133 arguments for the message (list)
134 </dd>
135 </dl>
136 <div align="right"><a href="#top">Up</a></div>
137 <hr />
138 </body></html>

eric ide

mercurial