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

Replace legacy string formatting with f-strings #889

Open
quantum5 opened this issue Sep 6, 2021 · 5 comments
Open

Replace legacy string formatting with f-strings #889

quantum5 opened this issue Sep 6, 2021 · 5 comments
Labels

Comments

@quantum5
Copy link
Member

quantum5 commented Sep 6, 2021

We can replace all legacy %-formatting and the majority of the slightly newer .format formatting with f-strings. This is a bit of a long term project and we don't expect it to be done anytime soon.

@Riolku
Copy link
Contributor

Riolku commented Sep 7, 2021

I'll work on this: we can make use of https://pypi.org/project/flake8-use-fstring/ (https://github.com/MichaelKim0407/flake8-use-fstring). I'll see when I can get a PR up.

@quantum5
Copy link
Member Author

quantum5 commented Sep 7, 2021

You should probably get PyCharm then. It can autoconvert all sorts of string formatting, including the obscure options that we use, to f-strings.

@Riolku
Copy link
Contributor

Riolku commented Sep 7, 2021

Alright, I might look into it. Alternatively... I might see if there's something for Atom.

@quantum5
Copy link
Member Author

quantum5 commented Sep 7, 2021

Here's an example:

pycharm.mp4

@Riolku
Copy link
Contributor

Riolku commented Sep 7, 2021

Ooh, that is quite nice... maybe I'll have to install it if I don't find anything for atom...

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

No branches or pull requests

2 participants