-
Notifications
You must be signed in to change notification settings - Fork 13
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
Linter: function parameters and line breaks #18
Comments
I might even go so far as to say when it has more than two (2) typed parameters. |
I'm ambivalent. @cfournie care to weigh in? |
When using the Python 2 function type annotations, matching names to types becomes difficult after two typed parameters and one parameter and comment per line would alleviate that difficulty. Using the Python 3 annotations I agree more with using one-param per line after 2 types parameters after reading these examples: def foo(self,
bar: int,
baz: str,
qux: long) -> bool
return True def foo(self, bar: int, baz: str, qux: long) -> bool
return True |
Those examples are pretty compelling, @cfournie . |
Then we're agreed. |
When a function declaration uses type hints and needs to break across lines to stay within the character limit, we should have one parameter per line.
e.g.
and not:
As discussed https://github.com/Shopify/data_bang/pull/97#discussion_r105196063
@erikwright @honkfestival @cfournie does that about sum it up?
The text was updated successfully, but these errors were encountered: