question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yapf 0.27 breaks lint

See original GitHub issue

Issue 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:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
seandstcommented, Apr 10, 2019

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 and format-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.

2reactions
decentral1secommented, Apr 10, 2019

any personal style preferences can be hashed out in reviews.

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 …

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found