-
Notifications
You must be signed in to change notification settings - Fork 82
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
"from injector import Key" fails #144
Comments
Looking at the Changelog, we have:
and
Here's the commit where they were deprecated. And here's a commit where the So the advice is apparently to "use real types or type aliases instead". E.g perhaps something like this would suffice for the example on the Terminology page...?
? I'm guessing (as a beginner trying to comprehend things) that since the key classes aren't ever instantiated (?) it doesn't matter what type we base our new type off? So I went for I'm hesitant about that conclusion however, as in that README-update commit, @jstasiak replaced
with a real |
I think nobody to update the docs - _ - ! |
Thanks for the info, documentation updated in e686f36. @gimbo Anything returned when you requested a
and then try to do string-things with it
mypy will complain (and so should other type checkers). |
The Keys section on the Terminology page contains the line:
from injector import Key
However, when I run that line in the terminal, I get an error: "ImportError: cannot import name 'Key' from 'injector'". Other imports such as
from injector import InstanceProvider
work fine in my setup.
The text was updated successfully, but these errors were encountered: