HomePhabricator

[lint] add the flynt linter for python f-strings

Description

[lint] add the flynt linter for python f-strings

Summary:
Convert Python code from "%-formatted" and .format(...) strings into f-strings

Remove existing conversion script that only handles %-formatted strings.

Performance impact:

Before:

$ time arc lint --everything
real	2m15,395s
user	9m59,264s
sys	1m8,720s

After:

$ time arc lint --everything
real	2m14,881s
user	10m6,171s
sys	1m8,421s

Test Plan:
Add a few %-formatted "...".format() strings in a functional test, and check that arc lint fixes them.

arc lint --everything

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13231

Details

Provenance
PiRKAuthored on Mar 3 2023, 13:40
PiRKPushed on Mar 28 2023, 15:00
Reviewer
Restricted Project
Differential Revision
D13231: [lint] add the flynt linter for python f-strings
Parents
rABC1e427c8fe7b8: [ecashaddrjs] Update readme to latest repo info
Branches
Unknown
Tags
Unknown