tools/spec: add instance variable type hints for Registry

This commit is contained in:
Danny Robson 2019-01-05 15:22:09 +11:00
parent ad67137abc
commit 336e9632d3

View File

@ -14,15 +14,14 @@ def rename(name: str):
############################################################################### ###############################################################################
class Registry: class Registry:
types: Dict[str, object] = {}
extensions: Dict = {}
features: Dict = {}
applied: Set = set()
def __init__(self): def __init__(self):
self.types = {}
self.extensions = {}
self.features = {}
self.types['API Constants'] = Unscoped('API Constants') self.types['API Constants'] = Unscoped('API Constants')
self.applied = set()
def _serialise(self, name: str, queued: Set[str]): def _serialise(self, name: str, queued: Set[str]):
if name in queued: if name in queued:
return [] return []