-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
feat: add example stubs #12679
feat: add example stubs #12679
Conversation
I only added evident type hints. I'll add those later on, either in this PR or the next - let me know what works best since I'll likely have little time for that in the next few days. |
@@ -19,14 +20,19 @@ | |||
FILE_TYPE = ".spacy" | |||
|
|||
|
|||
class ReaderProtocol(Protocol): | |||
def __call__(self, nlp: "Language") -> Iterable[Example]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought Iterator[Example]
was correct throughout here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered here.
Description
This PR adds a stubs file for
spacy.training.example
. It also fixes a few typing-related issues.Types of change
This is an enhancement.
Checklist