spaCy
spaCy copied to clipboard
Remove side effects from Doc.__init__()
Description
The existing version of Doc.__init__()
changes sent_starts
and ents
lists passed as parameters. This PR removes these side effects.
Closes #11499.
Types of change
Bugfix
Checklist
- [x] I confirm that I have the right to submit this contribution under the project's MIT license.
- [x] I ran the tests, and all new and existing tests passed.
- [x] My changes don't require a change to the documentation, or if they do, I've added all required information.
Also update the types in doc.pyi
?
Oh yes, sorry, hadn't seen that!
Looking good, I think the last thing that's missing is the corresponding update for the Doc
API docs.