diff options
author | Laurent Peuch <cortex@worlddomination.be> | 2019-12-19 03:00:43 +0100 |
---|---|---|
committer | Laurent Peuch <cortex@worlddomination.be> | 2019-12-19 03:00:43 +0100 |
commit | 3df3f3f0ddc7d444a66f4d1e17f8c04a125bbe93 (patch) | |
tree | 0780d49a42585a962334da301b6eb9b0578be1d6 /logilab | |
parent | 5acae0c4b98dc858d6734d850a1b413ddc7656f6 (diff) | |
download | logilab-common-3df3f3f0ddc7d444a66f4d1e17f8c04a125bbe93.tar.gz |
[mypy/fix] Need type annotation for '_PREDICATES'
Diffstat (limited to 'logilab')
-rw-r--r-- | logilab/common/registry.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/logilab/common/registry.py b/logilab/common/registry.py index cfebe17..3310864 100644 --- a/logilab/common/registry.py +++ b/logilab/common/registry.py @@ -87,6 +87,7 @@ import weakref import traceback as tb from os import listdir, stat from os.path import join, isdir, exists +from typing import Dict, Type from logging import getLogger from warnings import warn @@ -428,6 +429,7 @@ class Registry(dict): if self._select_listeners: select_best_report = { + "registry": self, "all_objects": [], "end_score": 0, "winners": [], @@ -1009,7 +1011,7 @@ def objectify_predicate(selector_func): '__call__': lambda self, *a, **kw: selector_func(*a, **kw)}) -_PREDICATES = {} +_PREDICATES: Dict[int, Type] = {} def wrap_predicates(decorator): for predicate in _PREDICATES.values(): |