Force function arguments on their own lines when splitting anway
See original GitHub issuedef _sync_class_booking(raw_class: Dict,
fitness_person: FitnessPerson,
booking_provider: BookingProvider,
payment_provider: PaymentProvider):
went to this:
def _sync_class_booking(raw_class: Dict, fitness_person: FitnessPerson, booking_provider: BookingProvider,
payment_provider: PaymentProvider):
when running yapf -i --style='{based_on_style: pep8, column_limit: 120}'
. It’s desirable to leave this unchanged. The rule would be, in plain English, “put function arguments on their own lines if they won’t all fit on one line”. I’ve attempted to get this working with the current settings but did not find a solution.
yapf verison: 0.7.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Define functions with too many arguments to abide by PEP8 ...
Having each argument on one line makes it very simple to use git diff s, since changing one variable will only show that...
Read more >function-call-argument-newline - Pluggable JavaScript Linter
This rule enforces line breaks between arguments of a function call. Options. This rule has a string option: "always" (default) requires line breaks...
Read more >What is the reason for splitting a C function's return type and ...
Two decent reasons people will break the return type from the function name in a declaration or definition. · 1. They like being...
Read more >The Black code style - Black 22.12.0 documentation
Black will add trailing commas to expressions that are split by comma where each element is on its own line. This includes function...
Read more >How can I split an equation over two (or more) lines - TeX
Use either breqn to break lines automatically or use amsmath and its many environments exactly for this purpose. For example, with breqn:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome! Thank you very much @gwelymernans!
@lexicalunit If you add a comma at the end of the list, then it remains the same. Otherwise, I don’t know if we can do much here.