Open
Bug 1973586
Opened 8 months ago
Updated 4 days ago
Add a Python linter rule to flag imports of the standard library `json` module instead of our `mozfile.json` compatibility shim
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P3)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
ASSIGNED
People
(Reporter: ahochheiden, Assigned: ahochheiden)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
We can only land this once all migrations in bug 1970521 are completed.
Since it's not possible to use orjson in all cases, we'll also need to add a way to suppress this lint via pragma so that in cases where it's necessary to use the standard library json the linter won't complain.
# noqa: TID251
Or something similar to the above (I'm not sure what the standard is for noqa).
The linter output should also communicate the existence of this pragma and when to use it, since most people getting this linter error will have none of this context.
Adding the linter should be one patch, then adding the pragmas to all the imports that could not be migrated to orson should be another.
Updated•7 months ago
|
Component: Mach Core → Lint and Formatting
Product: Firefox Build System → Developer Infrastructure
| Assignee | ||
Comment 2•4 days ago
|
||
Updated•4 days ago
|
Assignee: nobody → ahochheiden
Status: NEW → ASSIGNED
You need to log in
before you can comment on or make changes to this bug.
Description
•