void-packages/srcpkgs/python3-inflect/patches/fix-test.patch

29 lines
1.1 KiB
Diff

From f6177e1b30c7cda6e73b6a0aa7437fe5a16fd0aa Mon Sep 17 00:00:00 2001
From: Jaremy Hatler <hatler.jaremy@gmail.com>
Date: Sat, 23 Dec 2023 21:37:41 -0500
Subject: [PATCH] fix: compare validation now expects singular noun
On pydantic-code >= 2.12, the validation error messages use the singular
of the word "character" when the number 1 is specified in a condition.
This breaks the engine.compare validation, which expected the plural.
Refs: #204
Signed-off-by: Jaremy Hatler <hatler.jaremy@gmail.com>
---
inflect/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inflect/__init__.py b/inflect/__init__.py
index ccef776..fcb3d01 100644
--- a/inflect/__init__.py
+++ b/inflect/__init__.py
@@ -2466,7 +2466,7 @@ def compare(self, word1: Word, word2: Word) -> Union[str, bool]:
...
pydantic...ValidationError: ...
...
- ...at least 1 characters...
+ ...at least 1 character...
"""
norms = self.plural_noun, self.plural_verb, self.plural_adj
results = (self._plequal(word1, word2, norm) for norm in norms)