@@ -228,46 +228,6 @@ def matches(cls, cursor_offset, line, full_code, **kwargs):
228228 start , end , word = r
229229 return [name for name in MAGIC_METHODS if name .startswith (word )]
230230
231- class GlobalCompletion (BaseCompletionType ):
232- @classmethod
233- def matches (cls , cursor_offset , line , locals_ , mode , ** kwargs ):
234- r = cls .locate (cursor_offset , line )
235- if r is None :
236- return None
237- start , end , word = r
238- return global_matches (word , locals_ , mode )
239- locate = staticmethod (lineparts .current_single_word )
240-
241- class ParameterNameCompletion (BaseCompletionType ):
242- @classmethod
243- def matches (cls , cursor_offset , line , argspec , ** kwargs ):
244- if not argspec :
245- return None
246- r = cls .locate (cursor_offset , line )
247- if r is None :
248- return None
249- start , end , word = r
250- if argspec :
251- matches = [name + '=' for name in argspec [1 ][0 ]
252- if isinstance (name , basestring ) and name .startswith (word )]
253- if py3 :
254- matches .extend (name + '=' for name in argspec [1 ][4 ]
255- if name .startswith (word ))
256- return matches
257- locate = staticmethod (lineparts .current_word )
258-
259- class MagicMethodCompletion (BaseCompletionType ):
260- locate = staticmethod (lineparts .current_method_definition_name )
261- @classmethod
262- def matches (cls , cursor_offset , line , full_code , ** kwargs ):
263- r = cls .locate (cursor_offset , line )
264- if r is None :
265- return None
266- if 'class' not in full_code :
267- return None
268- start , end , word = r
269- return [name for name in MAGIC_METHODS if name .startswith (word )]
270-
271231class GlobalCompletion (BaseCompletionType ):
272232 @classmethod
273233 def matches (cls , cursor_offset , line , locals_ , mode , ** kwargs ):
0 commit comments