HomePhabricator

[flynt] remove buggy --transform-concats option

Description

[flynt] remove buggy --transform-concats option

Summary:
See https://github.com/ikamensh/flynt/issues/173

The linter will still be able to convert "%"-formatted strings and "{}".format( occurences to f-strings.
It will no longer simplify string concatenations.

Test Plan:
Touch test_runner.py and make sure arc lint does not clear the file.

Add actual lines that flynt will update, and check that the changes from arc lint is as expected. E.g:

diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 38ac427eeb..079079e3bb 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -163,6 +163,9 @@ class TestCase:
         self.test_num = test_num
         self.failfast_event = failfast_event
         self.flags = flags
+        a = "%s " % "toto"
+        b = "{}".format(a)
+        print(a + b)

     def run(self):
         if self.failfast_event.is_set():

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Apr 5 2023, 07:40
PiRKPushed on Apr 5 2023, 10:03
Reviewer
Restricted Project
Differential Revision
D13573: [flynt] remove buggy --transform-concats option
Parents
rABC12d7bb798747: [Chronik] Add `/script/:type/:payload/confirmed-txs`
Branches
Unknown
Tags
Unknown