use `ruff` instead of `flake8` in moz-phab
Categories
(Conduit :: moz-phab, enhancement)
Tracking
(Not tracked)
People
(Reporter: sheehan, Assigned: sheehan)
Details
Attachments
(6 files, 1 obsolete file)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
We should switch moz-phab from flake8 to ruff. We can also use some of ruff's linting capabilities to mass fix certain oddities in the codebase, namely switching to dict literals instead of calling the dict builtin.
| Assignee | ||
Comment 1•1 year ago
|
||
Switch from flake to ruff for styling. Update test_style.py
to lint the codebase with ruff.
| Assignee | ||
Comment 2•1 year ago
|
||
Run ruff across the entire codebase, then run with --unsafe-fixes
and manually vet their correctness.
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
Add a noqa for rule B019 to uses of lru_cache. Using the
lru cache in this way is a problem as the self value is used
as a cache key, which means a reference to the instance is kept
around by the cache, which can cause a memory leak since the
instance can't be garbage collected.
In our case, there is only ever one instance of a Repository
for the lifetime of the program, so we aren't worried about
an issue with the garbage collector.
| Assignee | ||
Comment 6•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Updated•1 year ago
|
Description
•