From f1c7cef9f85d172eb00714e6618d39b6b260a4d0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 17:33:11 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- reg/predicate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reg/predicate.py b/reg/predicate.py index ca8f418..f3a8b95 100644 --- a/reg/predicate.py +++ b/reg/predicate.py @@ -154,7 +154,7 @@ def __init__(self, *predicates): p, q, r = key_getters self.key = lambda **kw: (p(kw), q(kw), r(kw)) else: - self.key = lambda **kw: tuple([p(kw) for p in key_getters]) + self.key = lambda **kw: tuple(p(kw) for p in key_getters) def register(self, key, value): if key in self.known_keys: @@ -198,7 +198,7 @@ def key_dict_to_predicate_key(self, d): expected value is used. :returns: a tuple, to be used as a key for dispatching. """ - return tuple([p.key_by_predicate_name(d) for p in self.predicates]) + return tuple(p.key_by_predicate_name(d) for p in self.predicates) def component(self, keys): return next(self.all(keys), None)