Skip to content

fix typeshed sync#1841

Closed
tharvik wants to merge 1 commit into
python:masterfrom
tharvik:fix_types_error
Closed

fix typeshed sync#1841
tharvik wants to merge 1 commit into
python:masterfrom
tharvik:fix_types_error

Conversation

@tharvik

@tharvik tharvik commented Jul 11, 2016

Copy link
Copy Markdown
Contributor

Currently, syncing typeshed fail with mypy, mainly because of typeshed#344. This PR works around it. This doesn't sync it, simply will avoid issue while doing it.

In itself, the stubs are correct, it's more related to how mypy handle some cases, here a short list

I've also added a line for typeshed#352.

@gvanrossum

Copy link
Copy Markdown
Member

@JukkaL what do you think of this? We should probably decide what to do with this before releasing 0.4.3.

Comment thread mypy/main.py
special_opts = argparse.Namespace()
parser.parse_args(args, SplitNamespace(options, special_opts, 'special-opts:'))
namespace = SplitNamespace(options, special_opts, 'special-opts:')
parser.parse_args(args, namespace) # type: ignore

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is fixed more simply by making SplitNamespace inherit from Namespace.

@gvanrossum

Copy link
Copy Markdown
Member

Closing in favor of #1849. Thanks for being on the lookout for this!

@gvanrossum gvanrossum closed this Jul 12, 2016
@tharvik tharvik deleted the fix_types_error branch July 14, 2016 07:48
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