summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2019-12-19 06:37:01 +0100
committerLaurent Peuch <cortex@worlddomination.be>2019-12-19 06:37:01 +0100
commit20c7f941f3761a742e5fe65ae13639c20e2d428f (patch)
tree99a09fb054bfe259400e321c03d06303e3ad7e95
parentdb9e43ddaaad234e51a1969b898be5873c83ade1 (diff)
downloadlogilab-common-20c7f941f3761a742e5fe65ae13639c20e2d428f.tar.gz
[mypy] type RegistrableObject.__regid__/__registry__
-rw-r--r--logilab/common/registry.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/logilab/common/registry.py b/logilab/common/registry.py
index dc61883..6f60ef9 100644
--- a/logilab/common/registry.py
+++ b/logilab/common/registry.py
@@ -87,10 +87,9 @@ import weakref
import traceback as tb
from os import listdir, stat
from os.path import join, isdir, exists
-from typing import Dict, Type
+from typing import Dict, Type, Optional, Union
from logging import getLogger
from warnings import warn
-from typing import Union
from logilab.common.modutils import modpath_from_file
from logilab.common.logging_ext import set_log_methods
@@ -399,8 +398,8 @@ class RegistrableObject(object):
that should be automatically registered.
"""
- __registry__ = None
- __regid__: Union[None, str] = None
+ __registry__: Optional[str] = None
+ __regid__: Optional[str] = None
__select__: Union[None, str, Predicate] = None
__abstract__ = True # see doc snipppets below (in Registry class)