Can / should importing a constant string from an untyped library infer the type? #5678
Unanswered
davetapley
asked this question in
Ideas
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the Falcon package which does not have types (yet falconry/falcon#1820).
Accordingly I'm adding my own
.pyi
as I go, but I just came upon a weird case.Falcon has a constants module which has e.g.:
and I can import like this:
But VSCode is still reporting
(import) MEDIA_JSON: Unknown
.Can it really not even infer the type of that without a hint?
I can add to my
.pyi
, but it seems crazy that it couldn't even infer that? 🤔Beta Was this translation helpful? Give feedback.
All reactions