1
0
forked from VimPlug/jedi

Generate type hints, fixes #987

This commit is contained in:
Dave Halter
2020-02-02 16:55:10 +01:00
parent f4b1fc479d
commit 4c7179bc87
8 changed files with 91 additions and 0 deletions

View File

@@ -221,6 +221,11 @@ class ClassMixin(object):
def _as_context(self):
return ClassContext(self)
def get_type_hint(self, add_class_info=True):
if add_class_info:
return 'Type[%s]' % self.py__name__()
return self.py__name__()
class ClassValue(use_metaclass(CachedMetaClass, ClassMixin, FunctionAndClassBase)):
api_type = u'class'