from contextlib import contextmanager
from threading import Lock
+from typing import Dict
# singleton design pattern taken from http://www.aleax.it/5ep.html
_shared_state = {
'lock' : Lock(),
'init' : False
- }
+ } # type: Dict
def __init__(self):
with self._shared_state['lock']: