Add type annotation to app.pillar_extensions
This commit is contained in:
parent
4e268510f2
commit
1ce13b71a3
@ -59,11 +59,14 @@ class ConfigurationMissingError(SystemExit):
|
|||||||
|
|
||||||
class PillarServer(Eve):
|
class PillarServer(Eve):
|
||||||
def __init__(self, app_root, **kwargs):
|
def __init__(self, app_root, **kwargs):
|
||||||
|
from .extension import PillarExtension
|
||||||
|
|
||||||
kwargs.setdefault('validator', custom_field_validation.ValidateCustomFields)
|
kwargs.setdefault('validator', custom_field_validation.ValidateCustomFields)
|
||||||
super(PillarServer, self).__init__(settings=empty_settings, **kwargs)
|
super(PillarServer, self).__init__(settings=empty_settings, **kwargs)
|
||||||
|
|
||||||
# mapping from extension name to extension object.
|
# mapping from extension name to extension object.
|
||||||
self.pillar_extensions = collections.OrderedDict()
|
map_type = typing.MutableMapping[str, PillarExtension]
|
||||||
|
self.pillar_extensions: map_type = collections.OrderedDict()
|
||||||
self.pillar_extensions_template_paths = [] # list of paths
|
self.pillar_extensions_template_paths = [] # list of paths
|
||||||
|
|
||||||
self.app_root = os.path.abspath(app_root)
|
self.app_root = os.path.abspath(app_root)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user