yapf 0.27 breaks lint
See original GitHub issueIssue Type
- Bug report
Detail any linters or test runners used:
tox -e lint -e format-check
Desired Behavior
When using the latest yapf (currently 0.27), both the lint
and format-check
testenvs will succeed.
Actual Behaviour
When using the latest yapf on the current master, lint
will succeed, but format-check
will fail. If yapf if run with -i to modify files in-place (via tox -e format
), format-check
will succeed, but lint will fail.
This issue is being created as a central place to discuss how to proceed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
yapf 0.27 breaks lint #1916 - ansible-community/molecule
When using the latest yapf on the current master, lint will succeed, but format-check will fail. If yapf if run with -i to...
Read more >homebrew-core
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >Compare Packages Between Distributions
Often times it is useful to be able to compare the versions of different packages between two distributions. This can let us know...
Read more >https://gitee.com/mindspore/mindquantum/pulls/296.diff
+# ~~~ +function(check_compiler_flags lang var_prefix) + # cmake-lint: ... _${lang}_opts ${_flag}) + break() + endif() + endforeach() + endforeach() + + ...
Read more >How to configure YAPF to use hanging indentation for long ...
@jorgeh SPLIT_BEFORE_FIRST_ARGUMENT doesn't have any impact on getting hanging indentation for function parameters (with yapf 0.27.0 ).
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
Some notes about this from today’s working group meeting:
As I mentioned before, I’m only trivially frustrated with yapf. I don’t deeply care how code ends up looking as long as it’s still readable. With yapf currently pinned at 0.26, the
lint
andformat-check
testenvs get along with each other and work well together, so there’s no urgency to make a decision now that CI is green again. It’s possible that yapf will get updated in the meantime and resolve the flake8 incompatibility issue while this discussion continues.This is exactly the thing I like to avoid. And not even for myself but for contributors that might get exposed to some cranky “don’t do it like this” comment and then think that this is not a welcoming place. There are big possibilities for that to happen … overall, I think we need these tools because they are part of a equalising process for both new and old participants in this project. As as aside, I did like Knuth’s comment (from the back of my head, no link right now …) that we shouldn’t restrict people based on what they find satisfying style … but again, an overriding concern is contributor experience …
Personally, I use black on all my projects (following projects like pytest and tox!) and it has been “set it and forget it” … but I won’t advocate for switching tools just yet. Especially since it is beta and experimental right now.
Let’s just fix
yapf
for now … I might take a stab at it …