-
Notifications
You must be signed in to change notification settings - Fork 6
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
Convert to f-strings #188
Labels
cosmetic
Code cleanup, etc.
Comments
csatt
added a commit
that referenced
this issue
Jan 25, 2023
All formatted strings in the six files included in this commit were converted to f-strings. Pylint now doesn't generate any "consider-using-f-string" warnings. The conversion was assisted with the "flynt" tool. Nearly all were converted with "flynt -ll 999". Then flake8 was used to identify the lines that were >79 characters, and those were manually split onto multiple lines using string literal concatenation. There were a very small number that flynt couldn't comvert, and those were done manually.
Re-opening this issue for following reasons:
|
csatt
added a commit
that referenced
this issue
Feb 5, 2023
Don't know how this happened. I thought I ran pylint on all the changed files. And I also thought I ran the app! Apparently not.
csatt
added a commit
that referenced
this issue
Feb 5, 2023
Somehow missed the two PV_model files in the other commit for Issue #188. Also converting a few more strings that pylint didn't catch because the .format was used after the string template was assigned to a variable.
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current version of pylint generates many warnings like the following:
/Users/csatt/j/IV_Swinger.py:469:19: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)
f-strings were introduced in Python 3.6 and are the currently preferred way to format strings. They are easier to read and shorter than using the older .format() string method.
All Python 3 files except the Adafruit files and myTkSimpleDialog.py should be converted to use f-strings.
The text was updated successfully, but these errors were encountered: