dom/bindings: Make it flake8 compliant
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox108 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: banang.eb, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=python])
Attachments
(2 files, 5 obsolete files)
+++ This bug was initially created as a clone of Bug #1622676 +++
Filling as a good first bug to learn workflows.
As the change is easy, it is mostly to learn how to contribute to Firefox.
To work on this, remove this line:
https://searchfox.org/mozilla-central/source/.flake8#7
To run the linter:
$ ./mach lint -l flake8 dom/bindings
To run the autofix:
$ ./mach lint -l flake8 --fix dom/bindings
Then, the remaining thing should be fixed by hand.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
|
||
Chocos, please resubmit https://phabricator.services.mozilla.com/D80349
with an up to date version of mozphab.
We had a bug (bug 1648915)
thanks
Updated•4 years ago
|
Comment 6•4 years ago
|
||
This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Comment 7•2 years ago
|
||
--
user: Mark Kipyegon Koskei <mkipyegon@outlook.com> r?Sylvestre
branch 'default'
changed .flake8
changed Cargo.lock
changed dom/bindings/Configuration.py
changed dom/bindings/parser/tests/test_union.py
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
I'm really sorry, but I think there's an issue with the patch I submitted for this. The line I removed frrom exclude was the one highlighted in the link but it wasn't dom/bindings, so there are still unresolved linter errors as of now. Can I continue to amend this now it's been pushed?
Assignee | ||
Comment 12•2 years ago
|
||
Thanks, sorry again!
Comment 13•2 years ago
|
||
bugherder |
Assignee | ||
Comment 14•2 years ago
|
||
Comment 15•2 years ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
Backed out for causing multiple failures related to WebIDL.
Failure log for build bustages
Failure log for mbu jobs
Failure log for wp jobs
Backout link
snippet from build bustages failure log
[task 2022-12-17T09:59:42.629Z] 09:59:42 INFO - gmake[4]: Entering directory '/builds/worker/workspace/obj-build/dom/bindings'
[task 2022-12-17T09:59:42.631Z] 09:59:42 INFO - /builds/worker/workspace/obj-build/_virtualenvs/build/bin/python -m mozbuild.action.webidl /builds/worker/checkouts/gecko/dom/bindings
[task 2022-12-17T09:59:42.632Z] 09:59:42 ERROR - Traceback (most recent call last):
[task 2022-12-17T09:59:42.632Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py", line 8837, in __init__
[task 2022-12-17T09:59:42.633Z] 09:59:42 INFO - self.parser = yacc.yacc(
[task 2022-12-17T09:59:42.634Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/third_party/python/ply/ply/yacc.py", line 3317, in yacc
[task 2022-12-17T09:59:42.635Z] 09:59:42 INFO - raise YaccError('Unable to build parser')
[task 2022-12-17T09:59:42.635Z] 09:59:42 INFO - ply.yacc.YaccError: Unable to build parser
[task 2022-12-17T09:59:42.636Z] 09:59:42 INFO - During handling of the above exception, another exception occurred:
[task 2022-12-17T09:59:42.637Z] 09:59:42 ERROR - Traceback (most recent call last):
[task 2022-12-17T09:59:42.638Z] 09:59:42 INFO - File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
[task 2022-12-17T09:59:42.639Z] 09:59:42 INFO - return _run_code(code, main_globals, None,
[task 2022-12-17T09:59:42.639Z] 09:59:42 INFO - File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
[task 2022-12-17T09:59:42.640Z] 09:59:42 INFO - exec(code, run_globals)
[task 2022-12-17T09:59:42.641Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/webidl.py", line 20, in <module>
[task 2022-12-17T09:59:42.642Z] 09:59:42 INFO - sys.exit(log_build_task(main, sys.argv[1:]))
[task 2022-12-17T09:59:42.642Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/util.py", line 18, in log_build_task
[task 2022-12-17T09:59:42.643Z] 09:59:42 INFO - return f(*args, **kwargs)
[task 2022-12-17T09:59:42.644Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/webidl.py", line 16, in main
[task 2022-12-17T09:59:42.645Z] 09:59:42 INFO - manager.generate_build_files()
[task 2022-12-17T09:59:42.645Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/dom/bindings/mozwebidlcodegen/__init__.py", line 290, in generate_build_files
[task 2022-12-17T09:59:42.646Z] 09:59:42 INFO - self._parse_webidl()
[task 2022-12-17T09:59:42.647Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/dom/bindings/mozwebidlcodegen/__init__.py", line 380, in _parse_webidl
[task 2022-12-17T09:59:42.647Z] 09:59:42 INFO - parser = WebIDL.Parser(self._cache_dir, lexer=None)
[task 2022-12-17T09:59:42.647Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py", line 8850, in __init__
[task 2022-12-17T09:59:42.647Z] 09:59:42 INFO - logger.reportGrammarErrors()
[task 2022-12-17T09:59:42.647Z] 09:59:42 INFO - File "/builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py", line 7040, in reportGrammarErrors
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - raise WebIDLError("\n".join(self.errors), [])
[task 2022-12-17T09:59:42.648Z] 09:59:42 ERROR - WebIDL.WebIDLError: error: /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py:7437: Syntax error in rule 'PartialInterfaceMembers'
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py:7653: Syntax error. Expected ':'
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py:7764: Syntax error in rule 'SEMICOLON'
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py:7783: Syntax error. Expected ':'
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py:7833: Syntax error. Expected ':'
[task 2022-12-17T09:59:42.648Z] 09:59:42 ERROR - gmake[4]: *** [Makefile:54: webidl.stub] Error 1
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/dom/bindings'
[task 2022-12-17T09:59:42.648Z] 09:59:42 INFO - gmake[4]: Target 'export' not remade because of errors.
[task 2022-12-17T09:59:42.648Z] 09:59:42 ERROR - gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:99: dom/bindings/export] Error 2
[task 2022-12-17T09:59:42.649Z] 09:59:42 INFO - gmake[4]: Nothing to be done for 'export'.
[task 2022-12-17T09:59:42.649Z] 09:59:42 INFO - gmake[5]: Entering directory '/builds/worker/workspace/obj-build/config/makefiles/xpidl'
Assignee | ||
Comment 18•2 years ago
|
||
Apologies, I think this is related to some of the docstrings in WebIDL.py that were over the character limit per line. As I wasn't previously familiar with WebIDL, I did not realise these were being automatically parsed and should not be modified. I will revert the relevant changes and exclude the file from flake8 linting.
Reporter | ||
Updated•2 years ago
|
Comment 19•2 years ago
|
||
Comment 20•2 years ago
|
||
bugherder |
Description
•