Skip to content

Function argument completion should not include default value #522

@gauss256

Description

@gauss256

Environment data

VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 3.6.3
OS and version: Ubuntu 14.04

Actual behavior

Suppose you have a function with signature foo(bar=None). If you type foo(ba it displays suggestions to complete the argument. If you hit Enter to accept the suggestion it enters bar=None.

Expected behavior

The completion should just be bar= without the default value None. After all, if we wanted the default value we wouldn't be typing bar. We're trying to change bar to something other than its default.

As it is you have to backspace over the default value to replace it.

I flip back and forth between VSCode and Jupyter notebooks a lot. Notebooks just complete with bar= and it is really convenient.

Steps to reproduce:

As above.

Metadata

Metadata

Labels

area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions