-
Notifications
You must be signed in to change notification settings - Fork 429
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
Apply pyupgrade suggestions #2891
Conversation
d3027dd
to
6aec195
Compare
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.
LGTM!
6e6496a
to
e321c61
Compare
4b27280
to
d53b121
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2891 +/- ##
==========================================
- Coverage 81.41% 81.40% -0.02%
==========================================
Files 145 145
Lines 20147 20146 -1
Branches 3217 3216 -1
==========================================
- Hits 16402 16399 -3
- Misses 2929 2931 +2
Partials 816 816
|
In Python 3, string literals are Unicode by default.
Use "yield from" instead of a loop with "yield".
Delete empty 1st line.
d53b121
to
2f42219
Compare
Replace "universal_newlines" with "text"
In Python 3, io.open() is an alias for the builtin open() function. https://docs.python.org/3/library/io.html#io.open
2f42219
to
dca4498
Compare
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.
Thanks @DimitriPapadopoulos,
I am going ahead and merge this PR
yield from
instead of a loop withyield
.subprocess.check_output
arguments., replaceuniversal_newlines
withtext
.I tried to replacestdout=subprocess.PIPE
/stderr=subprocess.PIPE
withcapture_output=True
, but it doesn't work. Yetcapture_output
is documented to be available in Python >= 3.7:https://docs.python.org/3/library/subprocess.html#subprocess.run