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

over-indenting per-line parameter list on return type annotation #785

Closed
simonpercivall opened this issue Dec 2, 2019 · 0 comments
Closed

Comments

@simonpercivall
Copy link

yapf 0.29
python 3.7.

When a return type annotation is added to a function definition, the parameter list gets indented an extra level:

My file test.py:

def func1(
    arg1,
    arg2,
) -> None:
    pass


def func2(
    arg1,
    arg2,
):
    pass

gets this diff (yapf -d with no extra settings):

--- test.py	(original)
+++ test.py	(reformatted)
@@ -1,6 +1,6 @@
 def func1(
-    arg1,
-    arg2,
+        arg1,
+        arg2,
 ) -> None:
     pass

I.e. only the function with the return type annotation gets the extra level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant