Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

"python.autoComplete.addBrackets": true adds brackets to imported functions #573

Open

Description

Aleksandrs Stier (@astier) commented on Wed Jan 30 2019

Environment data

  • VS Code version: 1.30.2
  • Extension version (available under the Extensions sidebar): 2019.1.0
  • OS and version: Arch
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda

Expected behaviour

Brackets should not be added to imported functions.

Actual behaviour

Brackets are added to imported functions.

Steps to reproduce:

  1. Create a python file
  2. Type from time import tim
  3. Press tab or enter to autocomplete the function time
  4. See how brackets are added at the end of the time-function from time import time()

Derek Keeler (@d3r3kk) commented on Thu Jan 31 2019

Verified, thanks for the report Aleksandrs Stier (@astier)!

Activity

  1. DonJayamanne commented on Jan 31, 2019

    @DonJayamanne
    Author

    I can replicate this at my end using latest LS.

  2. d3r3kk commented on Jan 31, 2019

    @d3r3kk

    Is this a language server issue? It happens for both Language Server as well as for Jedi...

  3. MikhailArkhipov commented on Feb 15, 2019

    @MikhailArkhipov

    New LS doesn't do that.

    image

    image

  4. jakebailey commented on Jun 27, 2019

    @jakebailey
    Member

    This is back after #1241, with the above test case no longer working.

  5. MikhailArkhipov commented on Oct 3, 2019

    @MikhailArkhipov

    https://github.com/microsoft/python-language-server/blob/master/src/LanguageServer/Impl/Completion/CompletionItemSource.cs#L46-46 - should not be adding () if this is completion in import statement (i.e. coming from GetResultFromImportSearch)

  6. removed this from the October 2019.2 milestone on Oct 21, 2019
  7. timkofu commented on Sep 19, 2020

    @timkofu

    Having this issue right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions