Page MenuHomePhabricator

Bug 1646421 - flake8 Fix a bunch of actual errors r?ahal
ClosedPublic

Authored by sylvestre on Jun 17 2020, 8:23 PM.

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
js/src/tests/test262-export.py
233

not sure it is what we want here

python/mozbuild/mozbuild/mach_commands.py
1484

not sure what we wanted to do here before?

taskcluster/taskgraph/transforms/job/common.py
201

not sure what we wanted to do here before?

tools/browsertime/mach_commands.py
273–274

this was a funny bug.
on the left, {40} was understood as .format()

sylvestre edited the summary of this revision. (Show Details)
ahal added inline comments.
js/src/devtools/rootAnalysis/t/testlib.py
54

This is now an unused variable.

I assume the intention was for it to go in the subprocess.check_call below rather than in the call to format. We should either add it there or remove it (worth following up with the owner of this file).

js/src/vm/jsopcode.py
340

Might be worth flagging the owner of this code in case they meant to include this in the message somewhere.

python/lldbutils/lldbutils/general.py
41

This should probably be except Exception:, unless they intentially meant to catch things like SystemExist and KeyboardInterrupt (which I doubt).

sylvestre edited the summary of this revision. (Show Details)
sylvestre marked an inline comment as not done.Jun 18 2020, 8:27 PM
sylvestre added subscribers: jonco, sfink, arai and 3 others.
sylvestre added inline comments.
js/src/devtools/rootAnalysis/t/testlib.py
54

@jonco @sfink what do you think?

js/src/vm/jsopcode.py
340

@arai @jandem what do you think folks ?

python/lldbutils/lldbutils/general.py
41

ok, I will fix that once I received feedback about the other items

python/mozbuild/mozbuild/mach_commands.py
1484

@nalexander rings a bell ?

taskcluster/taskgraph/transforms/job/common.py
201

@tomprince @Callek what do you think?

taskcluster/taskgraph/transforms/job/common.py
201

Looking through the history of this line, it looks like it comes from D20049 where varying cache names by project level was moved to a central place here. So we can remove the format here.

js/src/vm/jsopcode.py
340

thanks.
it should have been:

raise Exception('nuses should match stack notation: {op}: '
                '{nuses} != {stack_nuses} '
                '({stack_uses})'.format(
                    op=op,
                    nuses=nuses,
                    stack_nuses=stack_nuses,
                    stack_uses=opcode.stack_uses))
347

same here.

raise Exception('ndefs should match stack notation: {op}: '
                '{ndefs} != {stack_ndefs} '
                '({stack_defs})'.format(
                    op=op,
                    ndefs=ndefs,
                    stack_ndefs=stack_ndefs,
                    stack_defs=opcode.stack_defs))
python/mozbuild/mozbuild/mach_commands.py
1484

Once upon a time this was probably a make target. This looks fine.

sylvestre marked 3 inline comments as done and an inline comment as not done.
sylvestre edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Jun 20 2020, 11:38 AM
This revision was automatically updated to reflect the committed changes.