-
Notifications
You must be signed in to change notification settings - Fork 10.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
argparse for omit-needless-words.py #185
Conversation
Per the "Incremental Development" guidelines on the Contributing page on the Swift site, I would prefer that the two unrelated changes (adopting |
Sure no problem! @DougGregor let me know what you prefer. |
I caused a conflict before seeing this pull request (sorry). Can you update and resubmit? This is a great change. |
This does mean a minimum Python requirement of 2.7, by the way. We may already require that, though. (We mostly haven't kept track of what we use as long as it works on OS X.) |
@DougGregor ok rebased and merge conflicts fixed. @jrose-apple Yes argparse is new in 2.7, but I believe many modules in the utils directory are using it. |
32c90ce
to
d7eaf9a
Compare
Using python's newer argparse module for command line argument parsing. Also wrapping everything in a main method.
argparse for omit-needless-words.py
Stop wrapping end-of-line comments, add idempotency checks.
Resolve conflicts with master
SwiftSyntax update for "Shorten #file and add #filePath (behind an experimental flag)" (swiftlang#25656)
Add `--add-xcodebuild-flags` argument to `run` command
swiftlang#185) * Fix regression on default install dir after wix v4 port * Switched to StandardDirectory for runtime wxs * Fixed WindowsVolume reference for C:\Library-targeting wxs's * Capitalized Swift under Program Files * Change overridable install dir to the level above Library * Uniformize comments
Using the argparse module for omit-needless-words.py, so that the code takes
advantage of python's builtin library for parsing arguments, and reducing the length of the code.
Also wrapping everything within a main method that is only called if the program is the main one being run.