|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.QScintilla.TypingCompleters.CompleterPython</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.QScintilla.TypingCompleters.CompleterPython</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a typing completer for Python. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#CompleterPython">CompleterPython</a></td> |
|
25 <td>Class implementing typing completer for Python.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="CompleterPython" ID="CompleterPython"></a> |
|
36 <h2>CompleterPython</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing typing completer for Python. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 CompleterBase |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#CompleterPython.__init__">CompleterPython</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#CompleterPython.__dedentDefStatement">__dedentDefStatement</a></td> |
|
63 <td>Private method to dedent the line of the def statement to a previous def statement or class statement.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#CompleterPython.__dedentElseToIfWhileForTry">__dedentElseToIfWhileForTry</a></td> |
|
67 <td>Private method to dedent the line of the else statement to the last if, while, for or try statement with less (or equal) indentation.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#CompleterPython.__dedentExceptToTry">__dedentExceptToTry</a></td> |
|
71 <td>Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#CompleterPython.__dedentFinallyToTry">__dedentFinallyToTry</a></td> |
|
75 <td>Private method to dedent the line of the except statement to the last try statement with less (or equal) indentation.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#CompleterPython.__dedentToIf">__dedentToIf</a></td> |
|
79 <td>Private method to dedent the last line to the last if statement with less (or equal) indentation.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#CompleterPython.__inComment">__inComment</a></td> |
|
83 <td>Private method to check, if the cursor is inside a comment.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#CompleterPython.__inDoubleQuotedString">__inDoubleQuotedString</a></td> |
|
87 <td>Private method to check, if the cursor is within a double quoted string.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#CompleterPython.__inSingleQuotedString">__inSingleQuotedString</a></td> |
|
91 <td>Private method to check, if the cursor is within a single quoted string.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#CompleterPython.__inTripleDoubleQuotedString">__inTripleDoubleQuotedString</a></td> |
|
95 <td>Private method to check, if the cursor is within a triple double quoted string.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#CompleterPython.__inTripleSingleQuotedString">__inTripleSingleQuotedString</a></td> |
|
99 <td>Private method to check, if the cursor is within a triple single quoted string.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#CompleterPython.__isClassMethod">__isClassMethod</a></td> |
|
103 <td>Private method to check, if the user is defining a class method.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#CompleterPython.__isClassMethodDef">__isClassMethodDef</a></td> |
|
107 <td>Private method to check, if the user is defing a class method (@classmethod).</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#CompleterPython.__isStaticMethodDef">__isStaticMethodDef</a></td> |
|
111 <td>Private method to check, if the user is defing a static method (@staticmethod) method.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#CompleterPython.charAdded">charAdded</a></td> |
|
115 <td>Public slot called to handle the user entering a character.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#CompleterPython.readSettings">readSettings</a></td> |
|
119 <td>Public slot called to reread the configuration parameters.</td> |
|
120 </tr> |
|
121 </table> |
|
122 <h3>Static Methods</h3> |
|
123 |
|
124 <table> |
|
125 <tr><td>None</td></tr> |
|
126 </table> |
|
127 |
|
128 <a NAME="CompleterPython.__init__" ID="CompleterPython.__init__"></a> |
|
129 <h4>CompleterPython (Constructor)</h4> |
|
130 <b>CompleterPython</b>(<i>editor, parent=None</i>) |
|
131 |
|
132 <p> |
|
133 Constructor |
|
134 </p> |
|
135 <dl> |
|
136 |
|
137 <dt><i>editor</i></dt> |
|
138 <dd> |
|
139 reference to the editor object (QScintilla.Editor) |
|
140 </dd> |
|
141 <dt><i>parent</i></dt> |
|
142 <dd> |
|
143 reference to the parent object (QObject) |
|
144 </dd> |
|
145 </dl> |
|
146 <a NAME="CompleterPython.__dedentDefStatement" ID="CompleterPython.__dedentDefStatement"></a> |
|
147 <h4>CompleterPython.__dedentDefStatement</h4> |
|
148 <b>__dedentDefStatement</b>(<i></i>) |
|
149 |
|
150 <p> |
|
151 Private method to dedent the line of the def statement to a previous |
|
152 def statement or class statement. |
|
153 </p> |
|
154 <a NAME="CompleterPython.__dedentElseToIfWhileForTry" ID="CompleterPython.__dedentElseToIfWhileForTry"></a> |
|
155 <h4>CompleterPython.__dedentElseToIfWhileForTry</h4> |
|
156 <b>__dedentElseToIfWhileForTry</b>(<i></i>) |
|
157 |
|
158 <p> |
|
159 Private method to dedent the line of the else statement to the last |
|
160 if, while, for or try statement with less (or equal) indentation. |
|
161 </p> |
|
162 <a NAME="CompleterPython.__dedentExceptToTry" ID="CompleterPython.__dedentExceptToTry"></a> |
|
163 <h4>CompleterPython.__dedentExceptToTry</h4> |
|
164 <b>__dedentExceptToTry</b>(<i>hasColon</i>) |
|
165 |
|
166 <p> |
|
167 Private method to dedent the line of the except statement to the last |
|
168 try statement with less (or equal) indentation. |
|
169 </p> |
|
170 <dl> |
|
171 |
|
172 <dt><i>hasColon</i></dt> |
|
173 <dd> |
|
174 flag indicating the except type (boolean) |
|
175 </dd> |
|
176 </dl> |
|
177 <a NAME="CompleterPython.__dedentFinallyToTry" ID="CompleterPython.__dedentFinallyToTry"></a> |
|
178 <h4>CompleterPython.__dedentFinallyToTry</h4> |
|
179 <b>__dedentFinallyToTry</b>(<i></i>) |
|
180 |
|
181 <p> |
|
182 Private method to dedent the line of the except statement to the last |
|
183 try statement with less (or equal) indentation. |
|
184 </p> |
|
185 <a NAME="CompleterPython.__dedentToIf" ID="CompleterPython.__dedentToIf"></a> |
|
186 <h4>CompleterPython.__dedentToIf</h4> |
|
187 <b>__dedentToIf</b>(<i></i>) |
|
188 |
|
189 <p> |
|
190 Private method to dedent the last line to the last if statement with |
|
191 less (or equal) indentation. |
|
192 </p> |
|
193 <a NAME="CompleterPython.__inComment" ID="CompleterPython.__inComment"></a> |
|
194 <h4>CompleterPython.__inComment</h4> |
|
195 <b>__inComment</b>(<i>line, col</i>) |
|
196 |
|
197 <p> |
|
198 Private method to check, if the cursor is inside a comment. |
|
199 </p> |
|
200 <dl> |
|
201 |
|
202 <dt><i>line</i></dt> |
|
203 <dd> |
|
204 current line (integer) |
|
205 </dd> |
|
206 <dt><i>col</i></dt> |
|
207 <dd> |
|
208 current position within line (integer) |
|
209 </dd> |
|
210 </dl> |
|
211 <dl> |
|
212 <dt>Return:</dt> |
|
213 <dd> |
|
214 flag indicating, if the cursor is inside a comment (boolean) |
|
215 </dd> |
|
216 </dl> |
|
217 <a NAME="CompleterPython.__inDoubleQuotedString" ID="CompleterPython.__inDoubleQuotedString"></a> |
|
218 <h4>CompleterPython.__inDoubleQuotedString</h4> |
|
219 <b>__inDoubleQuotedString</b>(<i></i>) |
|
220 |
|
221 <p> |
|
222 Private method to check, if the cursor is within a double quoted |
|
223 string. |
|
224 </p> |
|
225 <dl> |
|
226 <dt>Return:</dt> |
|
227 <dd> |
|
228 flag indicating, if the cursor is inside a double |
|
229 quoted string (boolean) |
|
230 </dd> |
|
231 </dl> |
|
232 <a NAME="CompleterPython.__inSingleQuotedString" ID="CompleterPython.__inSingleQuotedString"></a> |
|
233 <h4>CompleterPython.__inSingleQuotedString</h4> |
|
234 <b>__inSingleQuotedString</b>(<i></i>) |
|
235 |
|
236 <p> |
|
237 Private method to check, if the cursor is within a single quoted |
|
238 string. |
|
239 </p> |
|
240 <dl> |
|
241 <dt>Return:</dt> |
|
242 <dd> |
|
243 flag indicating, if the cursor is inside a single |
|
244 quoted string (boolean) |
|
245 </dd> |
|
246 </dl> |
|
247 <a NAME="CompleterPython.__inTripleDoubleQuotedString" ID="CompleterPython.__inTripleDoubleQuotedString"></a> |
|
248 <h4>CompleterPython.__inTripleDoubleQuotedString</h4> |
|
249 <b>__inTripleDoubleQuotedString</b>(<i></i>) |
|
250 |
|
251 <p> |
|
252 Private method to check, if the cursor is within a triple double |
|
253 quoted string. |
|
254 </p> |
|
255 <dl> |
|
256 <dt>Return:</dt> |
|
257 <dd> |
|
258 flag indicating, if the cursor is inside a triple double |
|
259 quoted string (boolean) |
|
260 </dd> |
|
261 </dl> |
|
262 <a NAME="CompleterPython.__inTripleSingleQuotedString" ID="CompleterPython.__inTripleSingleQuotedString"></a> |
|
263 <h4>CompleterPython.__inTripleSingleQuotedString</h4> |
|
264 <b>__inTripleSingleQuotedString</b>(<i></i>) |
|
265 |
|
266 <p> |
|
267 Private method to check, if the cursor is within a triple single |
|
268 quoted string. |
|
269 </p> |
|
270 <dl> |
|
271 <dt>Return:</dt> |
|
272 <dd> |
|
273 flag indicating, if the cursor is inside a triple single |
|
274 quoted string (boolean) |
|
275 </dd> |
|
276 </dl> |
|
277 <a NAME="CompleterPython.__isClassMethod" ID="CompleterPython.__isClassMethod"></a> |
|
278 <h4>CompleterPython.__isClassMethod</h4> |
|
279 <b>__isClassMethod</b>(<i></i>) |
|
280 |
|
281 <p> |
|
282 Private method to check, if the user is defining a class method. |
|
283 </p> |
|
284 <dl> |
|
285 <dt>Return:</dt> |
|
286 <dd> |
|
287 flag indicating the definition of a class method (boolean) |
|
288 </dd> |
|
289 </dl> |
|
290 <a NAME="CompleterPython.__isClassMethodDef" ID="CompleterPython.__isClassMethodDef"></a> |
|
291 <h4>CompleterPython.__isClassMethodDef</h4> |
|
292 <b>__isClassMethodDef</b>(<i></i>) |
|
293 |
|
294 <p> |
|
295 Private method to check, if the user is defing a class method |
|
296 (@classmethod). |
|
297 </p> |
|
298 <dl> |
|
299 <dt>Return:</dt> |
|
300 <dd> |
|
301 flag indicating the definition of a class method (boolean) |
|
302 </dd> |
|
303 </dl> |
|
304 <a NAME="CompleterPython.__isStaticMethodDef" ID="CompleterPython.__isStaticMethodDef"></a> |
|
305 <h4>CompleterPython.__isStaticMethodDef</h4> |
|
306 <b>__isStaticMethodDef</b>(<i></i>) |
|
307 |
|
308 <p> |
|
309 Private method to check, if the user is defing a static method |
|
310 (@staticmethod) method. |
|
311 </p> |
|
312 <dl> |
|
313 <dt>Return:</dt> |
|
314 <dd> |
|
315 flag indicating the definition of a static method (boolean) |
|
316 </dd> |
|
317 </dl> |
|
318 <a NAME="CompleterPython.charAdded" ID="CompleterPython.charAdded"></a> |
|
319 <h4>CompleterPython.charAdded</h4> |
|
320 <b>charAdded</b>(<i>charNumber</i>) |
|
321 |
|
322 <p> |
|
323 Public slot called to handle the user entering a character. |
|
324 </p> |
|
325 <dl> |
|
326 |
|
327 <dt><i>charNumber</i></dt> |
|
328 <dd> |
|
329 value of the character entered (integer) |
|
330 </dd> |
|
331 </dl> |
|
332 <a NAME="CompleterPython.readSettings" ID="CompleterPython.readSettings"></a> |
|
333 <h4>CompleterPython.readSettings</h4> |
|
334 <b>readSettings</b>(<i></i>) |
|
335 |
|
336 <p> |
|
337 Public slot called to reread the configuration parameters. |
|
338 </p> |
|
339 <div align="right"><a href="#top">Up</a></div> |
|
340 <hr /> |
|
341 </body></html> |