77
88
99class ProjectMetadata :
10- def __init__ (self ,
11- project_name : str = None ,
12- project_slug : str = None ,
13- description : str = "" ,
14- author_name : str = "" ,
15- version : str = "" ,
16- license : str = "" ,
17- year : int = datetime .now ().year ,
18- template : str = "none" ,
19- template_version : str = "0" ,
20- ):
10+ def __init__ (
11+ self ,
12+ project_name : str = None ,
13+ project_slug : str = None ,
14+ description : str = "" ,
15+ author_name : str = "" ,
16+ version : str = "" ,
17+ license : str = "" ,
18+ year : int = datetime .now ().year ,
19+ template : str = "none" ,
20+ template_version : str = "0" ,
21+ ):
2122 self .project_name = clean_input (project_name ) if project_name else "myagent"
22- self .project_slug = clean_input (project_slug ) if project_slug else self .project_name
23+ self .project_slug = (
24+ clean_input (project_slug ) if project_slug else self .project_name
25+ )
2326 self .description = description
2427 self .author_name = author_name
2528 self .version = version
@@ -76,10 +79,11 @@ def to_json(self):
7679
7780
7881class FrameworkData :
79- def __init__ (self ,
80- # name: Optional[Literal["crewai"]] = None
81- name : str = None # TODO: better framework handling, Literal or Enum
82- ):
82+ def __init__ (
83+ self ,
84+ # name: Optional[Literal["crewai"]] = None
85+ name : str = None , # TODO: better framework handling, Literal or Enum
86+ ):
8387 self .name = name
8488
8589 def to_dict (self ):
@@ -92,12 +96,13 @@ def to_json(self):
9296
9397
9498class CookiecutterData :
95- def __init__ (self ,
96- project_metadata : ProjectMetadata ,
97- structure : ProjectStructure ,
98- # framework: Literal["crewai"],
99- framework : str ,
100- ):
99+ def __init__ (
100+ self ,
101+ project_metadata : ProjectMetadata ,
102+ structure : ProjectStructure ,
103+ # framework: Literal["crewai"],
104+ framework : str ,
105+ ):
101106 self .project_metadata = project_metadata
102107 self .framework = framework
103108 self .structure = structure
0 commit comments