eric6/Documentation/Source/eric6.QScintilla.TypingCompleters.CompleterPython.html

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

eric ide

mercurial