lots of typing fixes
This commit is contained in:
parent
51f580a304
commit
3665c34961
43 changed files with 260 additions and 178 deletions
|
@ -1,4 +1,5 @@
|
|||
import datetime
|
||||
from typing import Any
|
||||
|
||||
from app.extensions import db
|
||||
from app.models.mirrors import Proxy
|
||||
|
@ -72,7 +73,11 @@ class ProxyCloudfrontAutomation(ProxyAutomation):
|
|||
{% endfor %}
|
||||
"""
|
||||
|
||||
def import_state(self, state):
|
||||
def import_state(self, state: Any) -> None:
|
||||
assert(isinstance(state, dict))
|
||||
if "child_modules" not in state['values']['root_module']:
|
||||
# There are no CloudFront proxies deployed to import state for
|
||||
return
|
||||
for mod in state['values']['root_module']['child_modules']:
|
||||
if mod['address'].startswith('module.cloudfront_'):
|
||||
for res in mod['resources']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue