1
0
forked from VimPlug/jedi

Make sure param hints are working for functions

This commit is contained in:
Dave Halter
2020-02-02 18:36:56 +01:00
parent 4c7179bc87
commit e3c4b5b77e
3 changed files with 44 additions and 1 deletions
+4
View File
@@ -167,6 +167,10 @@ class GenericClass(ClassMixin, DefineGenericBase):
def get_type_hint(self, add_class_info=True):
n = self.py__name__()
# Not sure if this is the best way to do this, but all of these types
# are a bit special in that they have type aliases and other ways to
# become lower case. It's probably better to make them upper case,
# because that's what you can use in annotations.
n = dict(list="List", dict="Dict", set="Set", tuple="Tuple").get(n, n)
s = n + self._generics_manager.get_type_hint()
if add_class_info: