32 <tr><td>None</td></tr> |
32 <tr><td>None</td></tr> |
33 </table> |
33 </table> |
34 <h3>Functions</h3> |
34 <h3>Functions</h3> |
35 <table> |
35 <table> |
36 <tr> |
36 <tr> |
|
37 <td><a href="#__syntaxAndPyflakesCheck">__syntaxAndPyflakesCheck</a></td> |
|
38 <td>Function to compile one Python source file to Python bytecode and to perform a pyflakes check.</td> |
|
39 </tr><tr> |
37 <td><a href="#extractLineFlags">extractLineFlags</a></td> |
40 <td><a href="#extractLineFlags">extractLineFlags</a></td> |
38 <td>Function to extract flags starting and ending with '__' from a line comment.</td> |
41 <td>Function to extract flags starting and ending with '__' from a line comment.</td> |
39 </tr><tr> |
42 </tr><tr> |
|
43 <td><a href="#initBatchService">initBatchService</a></td> |
|
44 <td>Initialize the batch service and return the entry point.</td> |
|
45 </tr><tr> |
40 <td><a href="#initService">initService</a></td> |
46 <td><a href="#initService">initService</a></td> |
41 <td>Initialize the service and return the entry point.</td> |
47 <td>Initialize the service and return the entry point.</td> |
42 </tr><tr> |
48 </tr><tr> |
43 <td><a href="#normalizeCode">normalizeCode</a></td> |
49 <td><a href="#normalizeCode">normalizeCode</a></td> |
44 <td>Function to normalize the given code.</td> |
50 <td>Function to normalize the given code.</td> |
45 </tr><tr> |
51 </tr><tr> |
|
52 <td><a href="#syntaxAndPyflakesBatchCheck">syntaxAndPyflakesBatchCheck</a></td> |
|
53 <td>Module function to check syntax for a batch of files.</td> |
|
54 </tr><tr> |
46 <td><a href="#syntaxAndPyflakesCheck">syntaxAndPyflakesCheck</a></td> |
55 <td><a href="#syntaxAndPyflakesCheck">syntaxAndPyflakesCheck</a></td> |
47 <td>Function to compile one Python source file to Python bytecode and to perform a pyflakes check.</td> |
56 <td>Function to compile one Python source file to Python bytecode and to perform a pyflakes check.</td> |
|
57 </tr><tr> |
|
58 <td><a href="#worker">worker</a></td> |
|
59 <td>Module function acting as the parallel worker for the style check.</td> |
48 </tr> |
60 </tr> |
49 </table> |
61 </table> |
50 <hr /><hr /> |
62 <hr /><hr /> |
51 <a NAME="extractLineFlags" ID="extractLineFlags"></a> |
63 <a NAME="__syntaxAndPyflakesCheck" ID="__syntaxAndPyflakesCheck"></a> |
52 <h2>extractLineFlags</h2> |
64 <h2>__syntaxAndPyflakesCheck</h2> |
53 <b>extractLineFlags</b>(<i>line, startComment="</i>) |
65 <b>__syntaxAndPyflakesCheck</b>(<i>filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False</i>) |
54 <p> |
|
55 Function to extract flags starting and ending with '__' from a line |
|
56 comment. |
|
57 </p><dl> |
|
58 <dt><i>line</i></dt> |
|
59 <dd> |
|
60 line to extract flags from (string) |
|
61 </dd><dt><i>startComment=</i></dt> |
|
62 <dd> |
|
63 string identifying the start of the comment (string) |
|
64 </dd><dt><i>endComment=</i></dt> |
|
65 <dd> |
|
66 string identifying the end of a comment (string) |
|
67 </dd> |
|
68 </dl><dl> |
|
69 <dt>Returns:</dt> |
|
70 <dd> |
|
71 list containing the extracted flags (list of strings) |
|
72 </dd> |
|
73 </dl> |
|
74 <div align="right"><a href="#top">Up</a></div> |
|
75 <hr /><hr /> |
|
76 <a NAME="initService" ID="initService"></a> |
|
77 <h2>initService</h2> |
|
78 <b>initService</b>(<i></i>) |
|
79 <p> |
|
80 Initialize the service and return the entry point. |
|
81 </p><dl> |
|
82 <dt>Returns:</dt> |
|
83 <dd> |
|
84 the entry point for the background client (function) |
|
85 </dd> |
|
86 </dl> |
|
87 <div align="right"><a href="#top">Up</a></div> |
|
88 <hr /><hr /> |
|
89 <a NAME="normalizeCode" ID="normalizeCode"></a> |
|
90 <h2>normalizeCode</h2> |
|
91 <b>normalizeCode</b>(<i>codestring</i>) |
|
92 <p> |
|
93 Function to normalize the given code. |
|
94 </p><dl> |
|
95 <dt><i>codestring</i></dt> |
|
96 <dd> |
|
97 code to be normalized (string) |
|
98 </dd> |
|
99 </dl><dl> |
|
100 <dt>Returns:</dt> |
|
101 <dd> |
|
102 normalized code (string) |
|
103 </dd> |
|
104 </dl> |
|
105 <div align="right"><a href="#top">Up</a></div> |
|
106 <hr /><hr /> |
|
107 <a NAME="syntaxAndPyflakesCheck" ID="syntaxAndPyflakesCheck"></a> |
|
108 <h2>syntaxAndPyflakesCheck</h2> |
|
109 <b>syntaxAndPyflakesCheck</b>(<i>filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False</i>) |
|
110 <p> |
66 <p> |
111 Function to compile one Python source file to Python bytecode |
67 Function to compile one Python source file to Python bytecode |
112 and to perform a pyflakes check. |
68 and to perform a pyflakes check. |
113 </p><dl> |
69 </p><dl> |
114 <dt><i>filename</i></dt> |
70 <dt><i>filename</i></dt> |
133 (file name, line number, column, codestring (only at syntax |
89 (file name, line number, column, codestring (only at syntax |
134 errors), the message, a list with arguments for the message) |
90 errors), the message, a list with arguments for the message) |
135 </dd> |
91 </dd> |
136 </dl> |
92 </dl> |
137 <div align="right"><a href="#top">Up</a></div> |
93 <div align="right"><a href="#top">Up</a></div> |
|
94 <hr /><hr /> |
|
95 <a NAME="extractLineFlags" ID="extractLineFlags"></a> |
|
96 <h2>extractLineFlags</h2> |
|
97 <b>extractLineFlags</b>(<i>line, startComment="</i>) |
|
98 <p> |
|
99 Function to extract flags starting and ending with '__' from a line |
|
100 comment. |
|
101 </p><dl> |
|
102 <dt><i>line</i></dt> |
|
103 <dd> |
|
104 line to extract flags from (string) |
|
105 </dd><dt><i>startComment=</i></dt> |
|
106 <dd> |
|
107 string identifying the start of the comment (string) |
|
108 </dd><dt><i>endComment=</i></dt> |
|
109 <dd> |
|
110 string identifying the end of a comment (string) |
|
111 </dd> |
|
112 </dl><dl> |
|
113 <dt>Returns:</dt> |
|
114 <dd> |
|
115 list containing the extracted flags (list of strings) |
|
116 </dd> |
|
117 </dl> |
|
118 <div align="right"><a href="#top">Up</a></div> |
|
119 <hr /><hr /> |
|
120 <a NAME="initBatchService" ID="initBatchService"></a> |
|
121 <h2>initBatchService</h2> |
|
122 <b>initBatchService</b>(<i></i>) |
|
123 <p> |
|
124 Initialize the batch service and return the entry point. |
|
125 </p><dl> |
|
126 <dt>Returns:</dt> |
|
127 <dd> |
|
128 the entry point for the background client (function) |
|
129 </dd> |
|
130 </dl> |
|
131 <div align="right"><a href="#top">Up</a></div> |
|
132 <hr /><hr /> |
|
133 <a NAME="initService" ID="initService"></a> |
|
134 <h2>initService</h2> |
|
135 <b>initService</b>(<i></i>) |
|
136 <p> |
|
137 Initialize the service and return the entry point. |
|
138 </p><dl> |
|
139 <dt>Returns:</dt> |
|
140 <dd> |
|
141 the entry point for the background client (function) |
|
142 </dd> |
|
143 </dl> |
|
144 <div align="right"><a href="#top">Up</a></div> |
|
145 <hr /><hr /> |
|
146 <a NAME="normalizeCode" ID="normalizeCode"></a> |
|
147 <h2>normalizeCode</h2> |
|
148 <b>normalizeCode</b>(<i>codestring</i>) |
|
149 <p> |
|
150 Function to normalize the given code. |
|
151 </p><dl> |
|
152 <dt><i>codestring</i></dt> |
|
153 <dd> |
|
154 code to be normalized (string) |
|
155 </dd> |
|
156 </dl><dl> |
|
157 <dt>Returns:</dt> |
|
158 <dd> |
|
159 normalized code (string) |
|
160 </dd> |
|
161 </dl> |
|
162 <div align="right"><a href="#top">Up</a></div> |
|
163 <hr /><hr /> |
|
164 <a NAME="syntaxAndPyflakesBatchCheck" ID="syntaxAndPyflakesBatchCheck"></a> |
|
165 <h2>syntaxAndPyflakesBatchCheck</h2> |
|
166 <b>syntaxAndPyflakesBatchCheck</b>(<i>argumentsList, send, fx, cancelled</i>) |
|
167 <p> |
|
168 Module function to check syntax for a batch of files. |
|
169 </p><dl> |
|
170 <dt><i>argumentsList</i></dt> |
|
171 <dd> |
|
172 list of arguments tuples as given for |
|
173 syntaxAndPyflakesCheck |
|
174 </dd><dt><i>send</i></dt> |
|
175 <dd> |
|
176 reference to send function (function) |
|
177 </dd><dt><i>fx</i></dt> |
|
178 <dd> |
|
179 registered service name (string) |
|
180 </dd><dt><i>cancelled</i></dt> |
|
181 <dd> |
|
182 reference to function checking for a cancellation |
|
183 (function) |
|
184 </dd> |
|
185 </dl> |
|
186 <div align="right"><a href="#top">Up</a></div> |
|
187 <hr /><hr /> |
|
188 <a NAME="syntaxAndPyflakesCheck" ID="syntaxAndPyflakesCheck"></a> |
|
189 <h2>syntaxAndPyflakesCheck</h2> |
|
190 <b>syntaxAndPyflakesCheck</b>(<i>filename, codestring, checkFlakes=True, ignoreStarImportWarnings=False</i>) |
|
191 <p> |
|
192 Function to compile one Python source file to Python bytecode |
|
193 and to perform a pyflakes check. |
|
194 </p><dl> |
|
195 <dt><i>filename</i></dt> |
|
196 <dd> |
|
197 source filename (string) |
|
198 </dd><dt><i>codestring</i></dt> |
|
199 <dd> |
|
200 string containing the code to compile (string) |
|
201 </dd><dt><i>checkFlakes=</i></dt> |
|
202 <dd> |
|
203 flag indicating to do a pyflakes check (boolean) |
|
204 </dd><dt><i>ignoreStarImportWarnings=</i></dt> |
|
205 <dd> |
|
206 flag indicating to |
|
207 ignore 'star import' warnings (boolean) |
|
208 </dd> |
|
209 </dl><dl> |
|
210 <dt>Returns:</dt> |
|
211 <dd> |
|
212 dictionary with the keys 'error' and 'warnings' which |
|
213 hold a list containing details about the error/ warnings |
|
214 (file name, line number, column, codestring (only at syntax |
|
215 errors), the message, a list with arguments for the message) |
|
216 </dd> |
|
217 </dl> |
|
218 <div align="right"><a href="#top">Up</a></div> |
|
219 <hr /><hr /> |
|
220 <a NAME="worker" ID="worker"></a> |
|
221 <h2>worker</h2> |
|
222 <b>worker</b>(<i>input, output</i>) |
|
223 <p> |
|
224 Module function acting as the parallel worker for the style check. |
|
225 </p><dl> |
|
226 <dt><i>input</i></dt> |
|
227 <dd> |
|
228 input queue (multiprocessing.Queue) |
|
229 </dd><dt><i>output</i></dt> |
|
230 <dd> |
|
231 output queue (multiprocessing.Queue) |
|
232 </dd> |
|
233 </dl> |
|
234 <div align="right"><a href="#top">Up</a></div> |
138 <hr /> |
235 <hr /> |
139 </body></html> |
236 </body></html> |