forked from VimPlug/jedi
Tests and implementation for type(some class). (Which returns type)
This commit is contained in:
@@ -445,6 +445,9 @@ class Class(use_metaclass(CachedMetaClass, Wrapper)):
|
|||||||
def py__getattribute__(self, name):
|
def py__getattribute__(self, name):
|
||||||
return self._evaluator.find_types(self, name)
|
return self._evaluator.find_types(self, name)
|
||||||
|
|
||||||
|
def py__class__(self, evaluator):
|
||||||
|
return compiled.builtin.get_by_name('type')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def params(self):
|
def params(self):
|
||||||
return self.get_subscope_by_name('__init__').params
|
return self.get_subscope_by_name('__init__').params
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ import math
|
|||||||
import os
|
import os
|
||||||
#? type(os)
|
#? type(os)
|
||||||
type(math)
|
type(math)
|
||||||
|
class X(): pass
|
||||||
|
#? type
|
||||||
|
type(X)
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# re
|
# re
|
||||||
|
|||||||
Reference in New Issue
Block a user