Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No indentation after PEP 484 type hint for function def #1587

Closed
willfrey opened this issue May 3, 2018 · 3 comments
Closed

No indentation after PEP 484 type hint for function def #1587

willfrey opened this issue May 3, 2018 · 3 comments
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@willfrey
Copy link

willfrey commented May 3, 2018

Issue Type: Bug

Declaring a function with a PEP 484 style type hint results in the newline not being properly indented.

For example, if I type

def function() -> None:

I would expect that after pressing the return key to insert a newline, I would end up

def function() -> None:
    # here

however, I'm finding that I end up

def function() -> None:
# here

which is undesirable.

Indentation appears to be working just fine when I do not use PEP 484 type hints.

Extension version: 2018.4.0
VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:32:53.389Z)
OS version: Darwin x64 17.4.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2900)
Load (avg) 1, 2, 2
Memory (System) 16.00GB (6.31GB free)
Process Argv /Applications/Visual Studio Code.app/Contents/MacOS/Electron .
Screen Reader no
VM 0%
@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs PR area-formatting labels May 3, 2018
@brettcannon brettcannon added this to the May 2018 milestone May 3, 2018
@brettcannon
Copy link
Member

I can verify it's a bug.

@spdkils
Copy link

spdkils commented May 15, 2018

Oh nice, I was just going to bug report this. Glad to see it's already getting attention.

@DonJayamanne
Copy link

Closing as a duplicate of #1461

@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants