clusterfuzz icon indicating copy to clipboard operation
clusterfuzz copied to clipboard

Update `yapf`

Open DonggeLiu opened this issue 3 years ago • 8 comments

Not sure if I misinterpreted this, but I reckon chromium has been changed to pep8? Alternatively, it can be google or yapf. yapf has an error, though.

DonggeLiu avatar Oct 03 '22 00:10 DonggeLiu

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

jonathanmetzman avatar Oct 03 '22 21:10 jonathanmetzman

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

oliverchang avatar Oct 04 '22 01:10 oliverchang

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

Nothing is broken or urgent. I just noticed that chromium might be outdated when I was testing an automatic formatter that uses .style.yapf.

DonggeLiu avatar Oct 04 '22 01:10 DonggeLiu

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

Nothing is broken or urgent. I just noticed that chromium might be outdated when I was testing an automatic formatter that uses .style.yapf.

Ack, as @jonathanmetzman suggested, if we change this, we need to ensure that it doesn't break linting for all of our current files before merging this change. This seems lower priority if there's a lot to fix and there's no urgency.

oliverchang avatar Oct 04 '22 02:10 oliverchang

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

Nothing is broken or urgent. I just noticed that chromium might be outdated when I was testing an automatic formatter that uses .style.yapf.

Ack, as @jonathanmetzman suggested, if we change this, we need to ensure that it doesn't break linting for all of our current files before merging this change. This seems lower priority if there's a lot to fix and there's no urgency.

It was really a question, because there are a lot of benefits to either. Not fixing files: Doesn't absolutely screw up history by modifying every file.

Fixing files: Doesn't annoy future committers by forcing them to format files as well.

jonathanmetzman avatar Oct 04 '22 14:10 jonathanmetzman

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

Nothing is broken or urgent. I just noticed that chromium might be outdated when I was testing an automatic formatter that uses .style.yapf.

Ack, as @jonathanmetzman suggested, if we change this, we need to ensure that it doesn't break linting for all of our current files before merging this change. This seems lower priority if there's a lot to fix and there's no urgency.

It was really a question, because there are a lot of benefits to either. Not fixing files: Doesn't absolutely screw up history by modifying every file.

Fixing files: Doesn't annoy future committers by forcing them to format files as well.

Although we probably won't merge this soon: When it is time to merge this, would it be a good idea if I use this PR to fix all files? In this way, we can keep the lint/format consistent with the .style.yapf file as well. This will also fix the f-string and u-string issues in existing files, which we have to do in different new PRs anyway.

DonggeLiu avatar Oct 04 '22 23:10 DonggeLiu

@oliverchang should we run yapf with the new settings on everything? Or wait to do this file-by-file?

Lacking some context here, did something break with the chromium setting here?

Nothing is broken or urgent. I just noticed that chromium might be outdated when I was testing an automatic formatter that uses .style.yapf.

Ack, as @jonathanmetzman suggested, if we change this, we need to ensure that it doesn't break linting for all of our current files before merging this change. This seems lower priority if there's a lot to fix and there's no urgency.

It was really a question, because there are a lot of benefits to either. Not fixing files: Doesn't absolutely screw up history by modifying every file. Fixing files: Doesn't annoy future committers by forcing them to format files as well.

Although we probably won't merge this soon: When it is time to merge this, would it be a good idea if I use this PR to fix all files? In this way, we can keep the lint/format consistent with the .style.yapf file as well. This will also fix the f-string and u-string issues in existing files, which we have to do in different new PRs anyway.

I'm generally against mass formatting changes so I actually think maybe let files break in future lints. That for example is the policy of LLVM (can't find references) There's a discussion here about ignoring it in git blame: https://stackoverflow.com/questions/53502654/how-do-i-run-a-code-formatter-over-my-source-without-modifying-git-history maybe we format everything and go with that?

jonathanmetzman avatar Jan 25 '23 00:01 jonathanmetzman

@oliverchang I was thinking about this since I'm about to do a big refactor. Maybe we should land the upgrade without formatting everything and format files as they are modified. WDYT?

jonathanmetzman avatar Apr 26 '23 02:04 jonathanmetzman