def __init__(self, **kwargs): for key in self.attributes: if key in kwargs: if key == "version": kwargs[key] = "" if kwargs[key] == "*" else kwargs[key] setattr(self, key, kwargs[key]) else: setattr(self, key, None) if self.name: self.project_name = safe_name(self.name) self.key = self.project_name.lower()
def project_name(self) -> str: return safe_name(self.name)
def project_name(self) -> Optional[str]: if self.name is None: return None return safe_name(self.name)