Type checking with Pylance #8373
-
How to reproduce the behaviourNot really a bug, but rather an issue with type checking using vscode. Not sure if this is an issue of spacy or the vscode Pylance extension... import spacy
from spacy.tokens import Doc, Span, Token
from spacy.language import Language
from spacy.lang.en import English Importing Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
I believe this is because those types are defined in Cython and therefore don't have normal type annotations. |
Beta Was this translation helpful? Give feedback.
-
fyi; In case anyone is interested in contributing -- I created a first version of the stub files that works fine in my vscode environment and opened a PR #8427 |
Beta Was this translation helpful? Give feedback.
I believe this is because those types are defined in Cython and therefore don't have normal type annotations.