-
Notifications
You must be signed in to change notification settings - Fork 21
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
How to use Generics? #51
Comments
Well, you are not returning a dictionary in your second example. The return value is a function which returns a dictionary. Is it a typo or is it what you intended? |
Sorry, that was a typo in my post above. The method should return |
RussBaz
added a commit
that referenced
this issue
Dec 26, 2017
smarie
added a commit
to smarie/enforce
that referenced
this issue
Jan 30, 2018
….Dict to typing.Mapping. Fixes RussBaz#52, Fixes RussBaz#51, fixes RussBaz#47
smarie
added a commit
to smarie/enforce
that referenced
this issue
Jan 30, 2018
….Dict to typing.Mapping. Fixes RussBaz#52, Fixes RussBaz#51, fixes RussBaz#47
smarie
added a commit
to smarie/enforce
that referenced
this issue
Jan 31, 2018
….Dict to typing.Mapping. Fixes RussBaz#52, Fixes RussBaz#51, fixes RussBaz#47
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In mypy you can use this
And it validates just fine.
But with enforce I get a strange result
Seemingly, the generic type handling is different in enforce.
What's the best way to get a similar behavior to mypy?
The text was updated successfully, but these errors were encountered: