You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following up on this comment from a member of the Pylance team. As you can see from the screenshot below, Pylance doesn't recognize the Numba List type because it it isn't re-exported from numba.typed. It would be nice if the Numba types were automatically recognized by a type checker, so I'm asking if the stubs could be written in a way to make this possible.
The text was updated successfully, but these errors were encountered:
Thanks for opening this request @abianco88. I took a look at the numba.typed module in question and now recall that the List and Dict re-exports are done under PEP-562. This "delayed" import was added in #6948 so as to prevent compilation from occurring at import time which obviously would slow down importing Numba.
I'm not sure with how type checking works with respect to PEP-562, but understanding that might help fix it. I suppose two immediate options are:
Redesign the typed container modules so as to push the delayed import further down the import chain so that type checking "just works".
Supply separate stubs.
This issue will be raised at the maintainer triage/public Numba meetings next week.
Feature request
I'm following up on this comment from a member of the Pylance team. As you can see from the screenshot below, Pylance doesn't recognize the Numba List type because it it isn't re-exported from
numba.typed
. It would be nice if the Numba types were automatically recognized by a type checker, so I'm asking if the stubs could be written in a way to make this possible.The text was updated successfully, but these errors were encountered: