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

Fix unwanted spacing around equals in override completion#161

Merged
jakebailey merged 1 commit intomicrosoft:masterfrom
jakebailey:overload-spacing
Sep 27, 2018
Merged

Fix unwanted spacing around equals in override completion#161
jakebailey merged 1 commit intomicrosoft:masterfrom
jakebailey:overload-spacing

Conversation

@jakebailey
Copy link
Copy Markdown
Member

This resolves #145, but with the catch that LS seems to drop the type information before getting to the code I fixed, so repeating the example in #145 with the following base class:

class Foo:
    def bar(arg: int = 5):
        pass

Will complete out to:

class Bar(Foo):
    def bar(arg=5):
        return super().bar()

When it would be preferable to produce:

class Bar(Foo):
    def bar(arg: int = 5):
        return super().bar()

Making that improvement may take more investigation.

@jakebailey jakebailey merged commit 7dbeffa into microsoft:master Sep 27, 2018
@jakebailey jakebailey deleted the overload-spacing branch February 14, 2019 20:12
jakebailey added a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic formatting for overloaded method completions slightly off

2 participants