Пример #1
0
 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()
Пример #2
0
 def project_name(self) -> str:
     return safe_name(self.name)
Пример #3
0
 def project_name(self) -> Optional[str]:
     if self.name is None:
         return None
     return safe_name(self.name)