From 5dfccb20fc602d3800ac710b2c5b4f2a4a39d8ba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:25:06 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- cf_units/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cf_units/__init__.py b/cf_units/__init__.py index 0a40f0c8..81b67815 100644 --- a/cf_units/__init__.py +++ b/cf_units/__init__.py @@ -592,7 +592,7 @@ class Unit(_OrderedHashable): def _init_from_tuple(self, values): # Implements the required interface for an _OrderedHashable. # This will also ensure a Unit._init(*Unit.names) method exists. - for name, value in zip(self._names, values): + for name, value in zip(self._names, values, strict=False): object.__setattr__(self, name, value) # Provide hash semantics @@ -1385,9 +1385,7 @@ def __repr__(self): if self.calendar is None: result = f"{self.__class__.__name__}('{self}')" else: - result = "{}('{}', calendar='{}')".format( - self.__class__.__name__, self, self.calendar - ) + result = f"{self.__class__.__name__}('{self}', calendar='{self.calendar}')" return result def _offset_common(self, offset):