Python-language-server: Docstring tooltips show Microsoft.Python.Analysis.Type instead of default value for optional parameters

Created on 11 Oct 2019  路  4Comments  路  Source: microsoft/python-language-server


Hello,
I don't know since when my VSC has had this bug. I have tried with different projects, venv, the issue remains the same.

Environment data

  • Language Server version: 0.4.58.0
  • OS and version: Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): 2.7 / 3.7 or any

Actual behaviour

image

Expected behaviour

defaut value 100 instead of Microsoft.Python.Analysis.Values.PythonConstant

def hello(a, b=100, c={'a':4}):
    return a + b

if __name__ == "__main__":
    hello()
bug

All 4 comments

I can reproduce.

Bisects to #1614. Makes sense, since I changed the signature code.

builder.Append(p.DefaultValue); should be p.DefaultValueString

Yep, my bad.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ianyepan picture ianyepan  路  6Comments

drorata picture drorata  路  6Comments

marpala picture marpala  路  3Comments

mostafaeweda picture mostafaeweda  路  6Comments

ghost picture ghost  路  6Comments