From 08c0c4140cac4b02995638e958bc4c57b72633b3 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 21 Oct 2022 11:09:32 +0200 Subject: [PATCH] Remove unused error --- spacy/cli/find_threshold.py | 2 +- spacy/errors.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/spacy/cli/find_threshold.py b/spacy/cli/find_threshold.py index 283c6d4fb..6e4141d7b 100644 --- a/spacy/cli/find_threshold.py +++ b/spacy/cli/find_threshold.py @@ -109,7 +109,7 @@ def find_threshold( except KeyError as err: wasabi.msg.fail(title=str(err), exits=1) if not hasattr(pipe, "scorer"): - raise AttributeError(Errors.E1048) + raise AttributeError(Errors.E1047) if not silent: wasabi.msg.info( diff --git a/spacy/errors.py b/spacy/errors.py index 95a6e3ae2..836ad7853 100644 --- a/spacy/errors.py +++ b/spacy/errors.py @@ -952,8 +952,7 @@ class Errors(metaclass=ErrorsWithCodes): "sure it's overwritten on the subclass.") E1046 = ("{cls_name} is an abstract class and cannot be instantiated. If you are looking for spaCy's default " "knowledge base, use `InMemoryLookupKB`.") - E1047 = ("`find_threshold()` only supports components of type `TrainablePipe`.") - E1048 = ("`find_threshold()` only supports components with a `scorer` attribute.") + E1047 = ("`find_threshold()` only supports components with a `scorer` attribute.") # Deprecated model shortcuts, only used in errors and warnings