Skip to content

[build_script.py] Remove redundant argparse params #51

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

Merged
merged 1 commit into from
Feb 22, 2016

Conversation

modocache
Copy link
Contributor

  • For options like-this, argparse stores the variable name like_this. Remove redundant dest parameters in the build script.
  • For options marked as "store", argparse stores None when the option is not specified. Remove redundant default=None parameters in the build script.
  • For options marked as "store_true", the default value is False. Remove redundant default=True parameters in the build script.
  • The default action for options is "store". Remove redundant action="store" parameters in the build script.
  • argparse raw formatters only really make sense when used with multi-line strings that have custom indentation. It's not necessary in the build script.
  • --arch option is required.

- For options `like-this`, `argparse` stores the variable name
  `like_this`. Remove redundant `dest` parameters in the build script.
- For options marked as "store", `argparse` stores `None` when the
  option is not specified. Remove redudnant `default=None` parameters
  in the build script.
- For options marked as "store_true", the default value is `False`.
  Remove redundant `default=True` parameters in the build script.
- The default action for options is "store". Remove redundant
  `action="store"` parameters in the build script.
- `argparse` raw formatters only really make sense when used with
  multi-line strings that have custom indentation. It's not necessary
 in the build script.
- `--arch` option is required.
@mike-ferris
Copy link

Looks like a good simplification. Thanks!

mike-ferris pushed a commit that referenced this pull request Feb 22, 2016
[build_script.py] Remove redundant argparse params
@mike-ferris mike-ferris merged commit eb0d41a into swiftlang:master Feb 22, 2016
@modocache modocache deleted the build-script-redundancies branch February 22, 2016 19:56
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.

2 participants