-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Reland "Cleanup tools/emprofile.py and add more testing. NFC (#13403)" #13416
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
Conversation
|
The updated test seems to pass fine on mac and windows here... without any changed :-/ Do you have any links to the failing builds? Any idea why they failed? |
a409584 to
68c4178
Compare
Run the new test on windows to prove that it works there. This was reverted in 13410
|
View with "ignore whitespace" to better see what changed. |
| return files | ||
| except IOError: | ||
| return [] | ||
| files.append(f) |
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.
Somewhat indifferent about changing files += [f] to files.append(f), though is there a specific reason to favor append instead of the += form? iiuc the array += [element] syntax has been extensively used in the past in this repo?
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.
Yeah I don't feel strongly about it.
I think its a good habit to get into when building lists in python because it avoids creating the extra lists each time and (sometimes importantly) avoids re-binding the variable each time. (When you do += you end up throwing away both the old list and the single element list on the RHS. Not that is performance not relevant in this particular case :)
|
lgtm, nice cleanups! |
Run the new test on windows to prove that it works there.
This was reverted in #13410