Skip to content

argparse: Add required: boolean to SubparserOptions#54306

Merged
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
tsondergaard:argparse-subparser-required
Jul 6, 2021
Merged

argparse: Add required: boolean to SubparserOptions#54306
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
tsondergaard:argparse-subparser-required

Conversation

@tsondergaard
Copy link
Copy Markdown
Contributor

The required option was added in python 3.7.0a2 as a way to make
subparsers required again (the default behaviour in Python 2.7).

Since npm argparse 2.0.1 is a straight conversion of the Python
3.9.0rc1 version of argparse the required flag is valid here too.

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

The required option was added in python 3.7.0a2 as a way to make
subparsers required again (the default behaviour in Python 2.7).

* https://bugs.python.org/issue9253
* python/cpython#3027

Since npm argparse 2.0.1 is a straight conversion of the Python
3.9.0rc1 version of argparse the required flag is valid here too.
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jul 6, 2021

@tsondergaard Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 54306,
  "author": "tsondergaard",
  "headCommitOid": "c47b4d5b84ddab0ae0d0189e58473303c9e387de",
  "lastPushDate": "2021-07-06T13:09:01.000Z",
  "lastActivityDate": "2021-07-06T13:52:03.000Z",
  "mergeOfferDate": "2021-07-06T13:31:12.000Z",
  "mergeRequestDate": "2021-07-06T13:52:03.000Z",
  "mergeRequestUser": "tsondergaard",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "argparse",
      "kind": "edit",
      "files": [
        {
          "path": "types/argparse/argparse-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/argparse/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "arcticwaters",
        "tlaziuk",
        "eps1lon",
        "cakoose",
        "ondkloss",
        "doberkofler"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "eps1lon",
      "date": "2021-07-06T13:30:39.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 874747345,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Jul 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @arcticwaters @tlaziuk @eps1lon @cakoose @Ondkloss @doberkofler — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Jul 6, 2021
@typescript-bot
Copy link
Copy Markdown
Contributor

@tsondergaard Everything looks good here. Great job! I am ready to merge this PR (at c47b4d5) on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@arcticwaters, @tlaziuk, @eps1lon, @cakoose, @Ondkloss, @doberkofler: you can do this too.)

@tsondergaard
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 1bd9fac into DefinitelyTyped:master Jul 6, 2021
@tsondergaard tsondergaard deleted the argparse-subparser-required branch July 6, 2021 13:53
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/argparse@2.0.9 to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants