darker icon indicating copy to clipboard operation
darker copied to clipboard

Add conversion to f-strings using `flynt`

Open akaihola opened this issue 3 years ago • 2 comments

Fixes #266.

  • [x] PoC implementation
  • [ ] unit tests for:
    • [x] --help content
    • [ ] actual f-string conversions
  • [ ] documentation in README
    • [x] command line option in the --help copy
    • [ ] description
    • [ ] "New in" note
  • [x] Merge #376
  • [x] Merge #377
  • [ ] change log

akaihola avatar Feb 24 '22 19:02 akaihola

@jedie, the implementation is still in progress. I did two preparatery refactorings which will make it simpler to add new pre-processors (like flynt in addition to isort). Would you be willing to review them as well (#376 and #377)?

akaihola avatar Aug 27 '22 15:08 akaihola

@jedie, there's now a proof-of-concept implementation in this branch. It sits on top of two refactorin branches, and there aren't yet any unit tests. Also, no Flynt configuration whatsoever is being taken into account – and I think that's ok for the initial version of flynt support.

Feel free to test it!

akaihola avatar Aug 27 '22 17:08 akaihola

@jedie, this one is coming up in version 1.7.0. I've completed and cleaned up the branch, and marked this pull request as ready for review. Would you take a look?

There's quite a bit of clean-up and refactoring, and I tried to group things into separate commits for easier review.

akaihola avatar Dec 28 '22 21:12 akaihola

@Carreau, FYI, merging this PR will make it easier to continue with pyupgrade support in #51. Would you be interested to review this one?

akaihola avatar Dec 28 '22 22:12 akaihola