1+ from typing import List
2+ from pydantic import BaseModel
3+
4+
5+ class PyArg (BaseModel ):
6+ arg_name : str
7+ arg_type : str
8+
9+
110class PyImport (BaseModel ):
211 from_statement : str
312 imports : List [str ]
@@ -13,19 +22,12 @@ class PyCallSite(BaseModel):
1322 end_column : int
1423
1524
16- class PyClass (BaseModel ):
17- code_body : str
18- full_signature : str
19- super_classes : List [str ]
20- is_test_class : bool
21- class_name : str = None
22- methods : List [PyMethod ]
23-
24-
2525class PyMethod (BaseModel ):
2626 code_body : str
2727 method_name : str
2828 full_signature : str
29+ num_params : int
30+ modifier : str
2931 is_constructor : bool
3032 is_static : bool
3133 formal_params : List [PyArg ]
@@ -36,39 +38,26 @@ class PyMethod(BaseModel):
3638 end_line : int
3739
3840
41+ class PyClass (BaseModel ):
42+ code_body : str
43+ full_signature : str
44+ super_classes : List [str ]
45+ is_test_class : bool
46+ class_name : str = None
47+ methods : List [PyMethod ]
48+
49+
3950class PyModule (BaseModel ):
4051 qualified_name : str
4152 functions : List [PyMethod ]
4253 classes : List [PyClass ]
4354 imports : List [PyImport ]
44-
45-
46- class PyArg (BaseModel ):
47- arg_name : str
48- arg_type : str
55+ # expressions: str
4956
5057
5158class PyBuildAttributes (BaseModel ):
5259 """Handles all the project build tool (requirements.txt/poetry/setup.py) attributes"""
5360
54- # Name of the build file (e.g., 'setup.py', 'requirements.txt', 'pyproject.toml')
55- build_file_type : str
56- code_body : str
57- # Build tool used (e.g., 'setuptools', 'poetry', 'pip')
58- build_tool : str
59- package_name : str = None
60- version : str = None
61- dependencies : List [str ] = []
62- dev_dependencies : List [str ] = []
63- scripts : List [str ] = []
64-
6561
6662class PyConfig (BaseModel ):
6763 """Application configuration information"""
68-
69- config_file_names : Dict [str , str ] # Name of the configuration file
70- code_body : str # The content of the configuration file
71- config_type : str # Type of config file (e.g., 'json', 'yaml', 'ini', 'python')
72- settings : Dict [str , Any ] = {} # Parsed settings from the config file
73- start_line : int = None
74- end_line : int = None
0 commit comments