From: Aarni Koskela Date: Mon, 3 Feb 2025 09:21:59 +0000 (+0200) Subject: Do not implicitly mutate Catalog when accessing its properties X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4ff584fbe75b99563a5138e108c428df371a66d;p=thirdparty%2Fbabel.git Do not implicitly mutate Catalog when accessing its properties --- diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index f84a5bd1..954dad0e 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -613,7 +613,7 @@ class Catalog: num = 2 if self.locale: num = get_plural(self.locale)[0] - self._num_plurals = num + return num return self._num_plurals @property @@ -632,7 +632,7 @@ class Catalog: expr = '(n != 1)' if self.locale: expr = get_plural(self.locale)[1] - self._plural_expr = expr + return expr return self._plural_expr @property