def _ensure_required_keywords(config_data): # Verify that all mandatory keys have been satisfied missing_keys = [] # type: List[str] for key in _MANDATORY_PACKAGE_KEYS: if key not in config_data: missing_keys.append(key) if missing_keys: raise meta_errors.MissingSnapcraftYamlKeysError(keys=missing_keys)
def _validate_required_keys(self) -> None: """Verify that all mandatory keys have been satisfied.""" missing_keys: List[str] = [] for key in _MANDATORY_PACKAGE_KEYS: if key == "version" and self.adopt_info: continue if not self.__dict__[key]: missing_keys.append(key) if missing_keys: raise errors.MissingSnapcraftYamlKeysError(keys=missing_keys)
def _validate_required_keys(self) -> None: """Verify that all mandatory keys have been satisfied.""" missing_keys: List[str] = [] if not self.name: missing_keys.append("name") if not self.version and not self.adopt_info: missing_keys.append("version") if not self.summary: missing_keys.append("summary") if not self.description: missing_keys.append("description") if missing_keys: raise errors.MissingSnapcraftYamlKeysError(keys=missing_keys)