From f1ddac187de7e67923e8ee63192787179f70fa4c Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Wed, 23 Nov 2022 18:51:31 +0900 Subject: [PATCH] Remove unused error object (#11837) --- spacy/language.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spacy/language.py b/spacy/language.py index 836f3abf9..2789b6690 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -784,14 +784,6 @@ class Language: factory_name, source, name=name ) else: - if not self.has_factory(factory_name): - err = Errors.E002.format( - name=factory_name, - opts=", ".join(self.factory_names), - method="add_pipe", - lang=util.get_object_name(self), - lang_code=self.lang, - ) pipe_component = self.create_pipe( factory_name, name=name,