Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f-string roadmap? #28

Closed
alok opened this issue Mar 13, 2018 · 1 comment · Fixed by #36
Closed

f-string roadmap? #28

alok opened this issue Mar 13, 2018 · 1 comment · Fixed by #36

Comments

@alok
Copy link

alok commented Mar 13, 2018

You mention that f-string support was planned in the README, and I'm just curious if you had a rough idea of when that might be.

Big fan of the project by the way.

@asottile
Copy link
Owner

I haven't started working on it yet, unfortunately.

My plan is to start with simple replacements, ones that are unlikely to break other linters:

'foo {}'.format(bar)  # f'foo {bar}'  ## no linebreaks, strictly *shortens* the line
'foo {bar}'.format(bar=bar) # f'foo {bar}'  ## same
# maybe simple attribute accesses
'foo {}'.format(bar.baz)  # f'foo {bar.baz}'

And then expand from there!

My current WIP is implementing % formatting, where I'll likely be able to reuse some of the logic for f-strings: https://github.com/asottile/pyupgrade/tree/percent_format

But unsurprisingly, I have copious amounts of freetime ;) (sarcasm) so I haven't really had much time to work on either of those adventures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants