

def _validate_type_keys(self, custom_type):
    version = (custom_type[version.DEFINITION_VERSION] if (self.DEFINITION_VERSION in custom_type) else None)
    if version:
        self._validate_type_version(version)
        self.version = version
    for name in custom_type:
        if (name not in self.ALLOWED_TYPE_SECTIONS):
            ExceptionCollector.appendException(UnknownFieldError(what=('Template ' + self.import_def), field=name))

dataset/ETHPy150Open openstack/tosca-parser/toscaparser/elements/tosca_type_validation.py TypeValidation._validate_type_keys/VarMisuse@17/25 `self`->`version`