-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make all python scripts python3 compatible #4700
Conversation
Signed-off-by: albertteoh <[email protected]>
Signed-off-by: albertteoh <[email protected]>
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4700 +/- ##
==========================================
- Coverage 97.03% 97.02% -0.02%
==========================================
Files 301 301
Lines 17880 17880
==========================================
- Hits 17350 17348 -2
- Misses 425 426 +1
- Partials 105 106 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -1,6 +1,4 @@ | |||
from __future__ import ( | |||
absolute_import, print_function, division, unicode_literals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are implicitly imported in python3.
|
||
for file in sys.argv[1:]: | ||
print file | ||
backup = '%s.bak' % file | ||
print(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python3 is a bit more strict with print statements.
print file | ||
backup = '%s.bak' % file | ||
print(file) | ||
backup = f'{file}.bak' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the named formatted strings are a bit more readable, supported in python3.
Which problem is this PR solving?
Description of the changes
How was this change tested?
make fmt
runs successfully.make changelog
runs successfully.make draft-release
runs successfully.Checklist
- [ ] I have added unit tests for the new functionality- [ ] I have run lint and test steps successfullyjaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test