Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Feb 11, 2017

This implements python/typing#366 in mypy.

I didn't add detailed tests for these since there's little specific
to these classes in mypy's code. I can add more detailed tests
like those for defaultdict if that is preferred.

This PR depends on these two typeshed PRs [Update: both merged]:

@ilevkivskyi
Copy link
Member

@JelleZijlstra Thanks! I don't think many additional test are needed, maybe just few tests showing errors (like Counter[int]()['a']) plus maybe a separate test showing that ChainMap[int, str] errors if it was not imported.

@gvanrossum gvanrossum changed the title [blocked] add support for additional type aliases from collections Add support for additional type aliases from collections Feb 12, 2017
@gvanrossum
Copy link
Member

I guess I'll have to sync typeshed first, then you can merge that into this PR, and then the tests ought to pass and it can be merged.

@gvanrossum gvanrossum mentioned this pull request Feb 12, 2017
@gvanrossum
Copy link
Member

Done. Can you merge from master and re-push?

I didn't add detailed tests for these since there's little specific
to these classes in mypy's code. I can add more detailed tests
like those for defaultdict if that is preferred.

This PR depends on these two typeshed PRs:
- python/typeshed#929
- python/typeshed#928
@JelleZijlstra
Copy link
Member Author

Done. Thanks for taking care of the sync!

@ilevkivskyi
Copy link
Member

ilevkivskyi commented Feb 15, 2017

@JukkaL @ddfisher This PR is no more blocked (typeshed is synced and all tests pass). I believe it could be merged now.

@rhettinger
Copy link

I've tested this patch on my own code and it works fine. I think it is ready to apply.

@gvanrossum gvanrossum merged commit b50e51f into python:master Mar 5, 2017
@gvanrossum
Copy link
Member

OK, merged. Sorry for the delay, I'm still dealing with health issues and not my usual responsive self.

@JelleZijlstra JelleZijlstra deleted the collections branch March 5, 2017 22:22
@JelleZijlstra
Copy link
Member Author

Thanks! No hurry.

umkay added a commit to umkay/zulip that referenced this pull request May 22, 2017
In the future, the type annotation should use Deque in order to be
compatible with the latest mypy version. Contingent on
python/mypy#2845 being merged.
umkay added a commit to umkay/zulip that referenced this pull request May 22, 2017
In the future, the type annotation should use Deque in order to be
compatible with the latest mypy version. See
python/mypy#2845 for more info.
timabbott pushed a commit to zulip/zulip that referenced this pull request May 23, 2017
In the future, the type annotation should use Deque in order to be
compatible with the latest mypy version. See
python/mypy#2845 for more info.
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.

4 participants