-
Notifications
You must be signed in to change notification settings - Fork 272
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
modernize formatting code for python 3.6+ #944
Conversation
Codecov Report
@@ Coverage Diff @@
## master #944 +/- ##
=======================================
Coverage 78.86% 78.86%
=======================================
Files 191 191
Lines 10966 10966
=======================================
Hits 8648 8648
Misses 2318 2318
Continue to review full report at Codecov.
|
This is pretty uncontroversial I think and ready for review - the poor codecov is unrelated - it just detects all of the coverage problems in the affected files |
ah, it seems codacy still is not treating this as modern python code (hence it now complains about the use of f-strings). I think we can ignore that for now and I'll try to see if there is a way around it (they claim it's fixed https://github.com/codacy/codacy-pylint/issues/41 , but I seems not to be) |
It seems no option I try makes codacy understand that this is python3.6. I could simply disable Prospector, perhaps. Even disabling the error F999 seems to have no effect. |
…nto modernize_code
I'll contact their support, but for now let's just accept this as is. |
I received an answer from Codacy, and it seems they are still using an outdated version of Prospector that doesn't support python 3.6+ syntax. They suggested just disabling that pattern (Prospector_F999), so I did so. Otherwise this PR is ready to go |
Since we dropped support for Python 3.5, we can now use some of the features of 3.6 everywhere. This PR upgrades the use of
str.format
to use f-strings instead (cleaner). The edits were not made manually, rather I used the pyupgrade refactoring tool (https://github.com/asottile/pyupgrade)