Wrong use of Optional[] in typing for config parameter in the Language class #9012
Labels
bug
Bugs and behaviour differing from documentation
feat / pipeline
Feature: Processing pipeline and components
types
Issues related to typing or typing tools
By the definition: https://docs.python.org/3/library/typing.html#typing.Optional
it is meant to signify a Union[sth, None] however if you pass a config=None to the add_pipe method:
spaCy/spacy/language.py
Line 725 in d94ddd5
you will get an error downstream from here:
spaCy/spacy/language.py
Line 628 in d94ddd5
Which page or section is this issue related to?
Code documentation in Language Pipeline
https://github.com/explosion/spaCy/blob/d94ddd568691cfa9d56b353173237afe1f328b43/spacy/language.py
The text was updated successfully, but these errors were encountered: