Make raptor code black compatible
Categories
(Testing :: Raptor, task, P4)
Tracking
(Not tracked)
People
(Reporter: Bebe, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [fxp])
Attachments
(1 obsolete file)
Review and update all raptor code base and make it black code style compatible
| Reporter | ||
Comment 1•6 years ago
|
||
:rwood :davehunt would this be ok?
| Reporter | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
(In reply to Florin Strugariu [:Bebe] from comment #1)
:rwood :davehunt would this be ok?
No. We need to keep the same Mozilla wide coding style. Also I don't wish to introduce more complexity at this time, we have several Raptor issues (i.e. intermittent failures) that we need to focus on. :)
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
Comment 3•6 years ago
|
||
I would love to see us adopting black or something like it, but rwood has a good point regarding consistency with the rest of mozilla-central. We should also include a solution to block patches that don't comply, or reformat them in a pre-commit hook. For now, let's block this on bug 1540641, which is experimenting with using black throughout the tree.
| Reporter | ||
Comment 5•6 years ago
|
||
As of https://wiki.mozilla.org/TestEngineering/Performance/Raptor#Code_formatting_on_Raptor
let's make raptor black compatible
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 6•6 years ago
|
||
| Reporter | ||
Comment 7•6 years ago
|
||
(In reply to Florin Strugariu [:Bebe] (needinfo me) from comment #5)
As of https://wiki.mozilla.org/TestEngineering/Performance/Raptor#Code_formatting_on_Raptor
let's make raptor black compatible
How are you going to enforce that? This question from comment 3 is still open, and it doesn't make that much sense to land those changes without having such enforcement in place. Also what is different to the internal linter? No other code in mozilla-central (AFAIK) wants to be black formatted.
| Reporter | ||
Comment 9•6 years ago
|
||
As black is the recomanded tool I just wanted to make sure we are compatible. No enforcement in mind.
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_python.html
Comment 10•6 years ago
|
||
Enforcement would be taken care of in bug 1540641. I think it's okay to update our code to be compatible, but accept that it may diverge without enforcement.
Oh, good to know that they added black on that page. In that case I assume our linter takes care of it, even if it's only partial (it might ignore " vs ').
| Reporter | ||
Comment 12•5 years ago
|
||
:ahal can you share your feedback on https://phabricator.services.mozilla.com/D62574
Comment 13•5 years ago
|
||
Looks fine to me, but my feedback isn't needed for formatting changes in modules I'm not involved with :)
| Reporter | ||
Comment 14•5 years ago
|
||
:Dave :Henrik can you recommend a resolution on this bug?
Should we continue/make raptor black compatible? or end this effort and resolve with won't fix
Comment 15•5 years ago
|
||
This bug depends on bug 1540641, which is assigned to Sylvestre. I am not against reformatting Raptor to make it black compatible, but if this is done without also enabling some sort of automated linter of formatter then it will quickly become inconsistent again. :Sylvestre do you have any plans to work on bug 1540641? Is there anything we can do to help?
| Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Yeah, I will have a look to black on the code base
Updated•5 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 17•2 years ago
|
||
I believe all our Python code is now black (or ruff). @ahal do you know if there's anything left to do here? I wonder if bug 1540641 and its dependencies can be resolved.
Comment 18•2 years ago
|
||
We don't use ruff's formatter yet, it's still black. And I don't see this dir listed in https://searchfox.org/mozilla-central/source/tools/lint/black.yml so it should be running.
Updated•18 days ago
|
Updated•7 days ago
|
Description
•