From 5eeb2e8f90e1a008d1fa0839bc3862e76d724a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danie=CC=88l=20de=20Kok?= Date: Wed, 6 Jul 2022 15:56:21 +0200 Subject: [PATCH] Start errors/warnings at higher numbers to avoid merge conflicts Between the master and v4 branches. --- spacy/errors.py | 4 ++-- spacy/pipeline/trainable_pipe.pyx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spacy/errors.py b/spacy/errors.py index cda9d47f0..7047fc0d1 100644 --- a/spacy/errors.py +++ b/spacy/errors.py @@ -209,7 +209,7 @@ class Warnings(metaclass=ErrorsWithCodes): "Only the last span group will be loaded under " "Doc.spans['{group_name}']. Skipping span group with values: " "{group_values}") - W121 = ("Activation '{activation}' is unknown for pipe '{pipe_name}'") + W400 = ("Activation '{activation}' is unknown for pipe '{pipe_name}'") class Errors(metaclass=ErrorsWithCodes): @@ -935,7 +935,7 @@ class Errors(metaclass=ErrorsWithCodes): E1041 = ("Expected a string, Doc, or bytes as input, but got: {type}") E1042 = ("Function was called with `{arg1}`={arg1_values} and " "`{arg2}`={arg2_values} but these arguments are conflicting.") - E1043 = ("store_activations attribute must be set to List[str] or bool") + E1400 = ("store_activations attribute must be set to List[str] or bool") # Deprecated model shortcuts, only used in errors and warnings diff --git a/spacy/pipeline/trainable_pipe.pyx b/spacy/pipeline/trainable_pipe.pyx index 499839c4a..23d65f0c7 100644 --- a/spacy/pipeline/trainable_pipe.pyx +++ b/spacy/pipeline/trainable_pipe.pyx @@ -361,11 +361,11 @@ cdef class TrainablePipe(Pipe): if activation in known_activations: self._store_activations.append(activation) else: - warnings.warn(Warnings.W121.format(activation=activation, pipe_name=self.name)) + warnings.warn(Warnings.W400.format(activation=activation, pipe_name=self.name)) elif isinstance(activations, bool): if activations: self._store_activations = list(known_activations) else: self._store_activations = [] else: - raise ValueError(Errors.E1043) + raise ValueError(Errors.E1400)