fix typeshed sync#1841
Closed
tharvik wants to merge 1 commit into
Closed
Conversation
Member
|
@JukkaL what do you think of this? We should probably decide what to do with this before releasing 0.4.3. |
| 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 |
Member
There was a problem hiding this comment.
This is fixed more simply by making SplitNamespace inherit from Namespace.
This was referenced Jul 12, 2016
Merged
Member
|
Closing in favor of #1849. Thanks for being on the lookout for this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
type()should beCallable, see Checking call signatures ofType[C]objects #1831boolcan be anything which do not evaluated toFalse(which is not the case by default), which is quite an issue with method expecting abool(more precisely, something that evaluate tobool), see Optional "no truth value testing" mode #1730I've also added a line for typeshed#352.