Skip to content
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

Merged
merged 1 commit into from
Dec 18, 2015

Conversation

cbrentharris
Copy link
Contributor

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.

@jrose-apple
Copy link
Contributor

Per the "Incremental Development" guidelines on the Contributing page on the Swift site, I would prefer that the two unrelated changes (adopting argparse, and wrapping everything in a main function) be separated into two commits. However, Doug's the main author of this file, so it's his call.

@cbrentharris
Copy link
Contributor Author

Sure no problem! @DougGregor let me know what you prefer.

@DougGregor
Copy link
Member

I caused a conflict before seeing this pull request (sorry). Can you update and resubmit? This is a great change.

@jrose-apple
Copy link
Contributor

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.)

@cbrentharris
Copy link
Contributor Author

@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.

@cbrentharris cbrentharris force-pushed the master branch 3 times, most recently from 32c90ce to d7eaf9a Compare December 8, 2015 21:47
Using python's newer argparse module for command line argument parsing.
Also wrapping everything in a main method.
DougGregor added a commit that referenced this pull request Dec 18, 2015
argparse for omit-needless-words.py
@DougGregor DougGregor merged commit 06e07c4 into swiftlang:master Dec 18, 2015
dabelknap added a commit to dabelknap/swift that referenced this pull request Jan 14, 2019
Stop wrapping end-of-line comments, add idempotency checks.
kateinoigakukun added a commit to kateinoigakukun/swift that referenced this pull request Feb 19, 2020
maldahleh pushed a commit to maldahleh/swift that referenced this pull request Oct 26, 2020
SwiftSyntax update for "Shorten #file and add #filePath (behind an experimental flag)" (swiftlang#25656)
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
Add `--add-xcodebuild-flags` argument to `run` command
DougGregor pushed a commit to DougGregor/swift that referenced this pull request Apr 28, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants