GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — argparse: fix error __init__, add BooleanOptionalAction for py39 by hauntsaninja · Pull Request #4144 · python/typeshed

Conversation

@hauntsaninja

@hauntsaninja hauntsaninja commented May 29, 2020

Copy link
Copy Markdown
Collaborator

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hauntsaninja
argparse: fix error __init__, add BooleanOptionalAction for py39
a8fa964
JelleZijlstra
JelleZijlstra requested changes May 30, 2020
View reviewed changes
Comment thread stdlib/2and3/argparse.pyi Outdated
class BooleanOptionalAction(Action):
def __init__(
self,
option_strings: Sequence[Text],

@JelleZijlstra JelleZijlstra May 30, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Python 3-only so no real need to use Text

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread stdlib/2and3/argparse.pyi
dest: Text,
const: Any = ...,
default: Any = ...,
type: Optional[Union[Callable[[Text], _T], Callable[[str], _T], FileType]] = ...,

@JelleZijlstra JelleZijlstra May 30, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this class be generic over _T?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@hauntsaninja hauntsaninja Jun 3, 2020

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so? Not sure what that would allows us to accomplish

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread stdlib/2and3/argparse.pyi Outdated
self,
option_strings: Sequence[Text],
dest: Text,
const: Any = ...,

@JelleZijlstra JelleZijlstra May 30, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully understand the description of this argument but it sounds like it and default should be of type Optional[_T].

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hauntsaninja
argparse: improve Action.__init__ types
7dd2edd
@hauntsaninja

hauntsaninja commented Jun 3, 2020

Copy link
Copy Markdown
Collaborator Author

Re: the unused in implementation, we'll see what happens python/cpython#11478 (review)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hauntsaninja
hauntsaninja requested a review from JelleZijlstra June 4, 2020 22:59
@JelleZijlstra
JelleZijlstra merged commit 5369e81 into python:master Jun 4, 2020
@hauntsaninja
hauntsaninja deleted the argparse branch June 4, 2020 23:01
hauntsaninja pushed a commit to hauntsaninja/typeshed that referenced this pull request Jun 26, 2020
hauntsaninja
argparse: fix for latest py39
b165e85
python#4144 and
python/cpython#11478 (review)
resulted in the issue being fixed upstream.

A fix in time saves a branch in typeshed :-)
@hauntsaninja hauntsaninja mentioned this pull request Jun 26, 2020
argparse: fix for latest py39 #4267
Merged
srittau pushed a commit that referenced this pull request Jun 26, 2020
@hauntsaninja
argparse: fix for latest py39 (#4267)
9a16b02
#4144 and
python/cpython#11478 (review)
resulted in the issue being fixed upstream.


Co-authored-by: hauntsaninja <>
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
@hauntsaninja Vishal Kuo
argparse: fix error __init__, add BooleanOptionalAction for py39 (pyt…
8fb9f09
…hon#4144)
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
@hauntsaninja Vishal Kuo
argparse: fix for latest py39 (python#4267)
1bb27cd
python#4144 and
python/cpython#11478 (review)
resulted in the issue being fixed upstream.


Co-authored-by: hauntsaninja <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@hauntsaninja @JelleZijlstra
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.