-
Notifications
You must be signed in to change notification settings - Fork 115
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
Remove shellify #184
Remove shellify #184
Conversation
… shellescape PyPI library instead.
Due to test failures, I will have to split off |
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
=========================================
Coverage ? 20.54%
=========================================
Files ? 27
Lines ? 2565
Branches ? 0
=========================================
Hits ? 527
Misses ? 2038
Partials ? 0
Continue to review full report at Codecov.
|
This reverts commit 67a0747.
This latest build failure is unrelated. During the process, mozilla-central upgraded its minimium Python requirement to be 3.5+ (see bug 1451065). All the checks pass at the previous ec0a3a1 changeset here. |
src/funfuzz/js/compare_jit.py
Outdated
@@ -109,7 +110,7 @@ def compareLevel(jsEngine, flags, infilename, logPrefix, options, showDetailedDi | |||
if (r.return_code == 1 or r.return_code == 2) and (anyLineContains(r.out, "[[script] scriptArgs*]") or ( | |||
anyLineContains(r.err, "[scriptfile] [scriptarg...]"))): | |||
print("Got usage error from:") | |||
print(" %s" % sps.shellify(command)) | |||
print(" %s" % " ".join([quote(x) for x in command])) |
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.
Don't use str.join([
list comprehension
])
, use str.join(
generator expression
)
instead.
List comprehension builds the whole list in-memory and then calls join()
on the result. A generator expression works as though each item is yielded to join()
as it is evaluated. The syntax is the same, just drop the square brackets.
This occurs on nearly every line changed, so I haven't added comments on them all.
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
shellescape from PyPI are the new goodness to use. This is because the custom functionspathlib2
from PyPI (orpathlib
via the Python 3.5+ stdlib) andgetAbsPathForAdjacentFile
,normExpUserPath
andshellify
do not have tests.This PR
starts us off the route for usingcompletely removespathlib2
/pathlib
in our tests first, andshellify
. Fixes #183.