Skip to content

collections.OrderedDict.copy() -> Dict? #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sophie-h opened this issue Sep 4, 2016 · 3 comments
Closed

collections.OrderedDict.copy() -> Dict? #2093

sophie-h opened this issue Sep 4, 2016 · 3 comments

Comments

@sophie-h
Copy link

sophie-h commented Sep 4, 2016

mypy 0.4.4

note: In function "f":
5: error: Incompatible return value type (got Dict[Any, Any], expected OrderedDict[Any, Any])
import collections

def f(x: collections.OrderedDict) -> collections.OrderedDict:
    y = x.copy()
    return y
@elazarg
Copy link
Contributor

elazarg commented Sep 4, 2016

Related: #1212

@elazarg
Copy link
Contributor

elazarg commented Oct 19, 2017

This is a duplicate of python/typeshed#1642 (which has been closed by now, but not fixed yet - at least not within mypy)

@JelleZijlstra
Copy link
Member

This is purely a typeshed problem, so let's close this one.

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

No branches or pull requests

3 participants