From 2480f8f521ea22b74ff90aed0853e9c0e2543b1b Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 18 Sep 2017 15:31:57 +0200 Subject: [PATCH] Add missing return in Doc.from_disk() (closes #1330) --- spacy/tokens/doc.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 3b1f38b68..fcb5a16fa 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -660,7 +660,7 @@ cdef class Doc: """ with path.open('rb') as file_: bytes_data = file_.read() - self.from_bytes(bytes_data, **exclude) + return self.from_bytes(bytes_data, **exclude) def to_bytes(self, **exclude): """Serialize, i.e. export the document contents to a binary string.