Page MenuHomePhabricator

contrib: widen "direct use of `python`" net again
ClosedPublic

Authored by durin42 on Jul 5 2017, 12:35 PM.

Details

Summary

I think I've now caught all of them.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Jul 5 2017, 12:35 PM
dsp added a subscriber: dsp.Jul 6 2017, 4:48 AM
dsp added inline comments.
contrib/check-code.py
141

can we just make this a character class, seems easier to read?

r'[\s\'"`=]python\s(?!bindings)', ...
dsp added a comment.Jul 6 2017, 4:53 AM

Note that tests/test-demandimport.py, and tests/test-filecache.py call subprocess.call(['python',..., do we want to catch this to use $PYTHON (or anything else that is not literal, e.g. os.environ.get('PYTHON', 'python') as well? If so we might want to check for ['

durin42 updated this revision to Diff 27.Jul 6 2017, 3:21 PM
durin42 marked an inline comment as done.Jul 6 2017, 3:22 PM
durin42 added inline comments.
contrib/check-code.py
141

Nice catch.

krbullock accepted this revision.Jul 6 2017, 3:43 PM
This revision is now accepted and ready to land.Jul 6 2017, 3:43 PM
dsp changed the visibility from "All Users" to "Public (No Login Required)".Jul 6 2017, 5:40 PM
durin42 marked an inline comment as done.Jul 7 2017, 10:34 AM
This revision was automatically updated to reflect the committed changes.