Skip to content

Commit 7392fed

Browse files
committed
Update schema to capture new entrypoint methods.
Signed-off-by: Rahul Krishna <rkrsn@ibm.com>
1 parent 3b3e10e commit 7392fed

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

codeanalyzer/schema/py_schema.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
This module defines the data models used to represent Python code structures
2020
for static analysis purposes.
2121
"""
22+
2223
from __future__ import annotations
24+
25+
import gzip
2326
import inspect
2427
from pathlib import Path
2528
from typing import Any, Dict, List, Optional
26-
import gzip
2729

30+
import msgpack
2831
from pydantic import BaseModel
2932
from typing_extensions import Literal
30-
import msgpack
3133

3234

3335
def msgpk(cls):
@@ -280,12 +282,12 @@ class PyCallable(BaseModel):
280282
inner_classes: Dict[str, "PyClass"] = {}
281283
local_variables: List[PyVariableDeclaration] = []
282284
cyclomatic_complexity: int = 0
285+
is_entrypoint: bool = False
286+
entrypoint_framework: Optional[str] = None
283287

284288
def __hash__(self) -> int:
285289
"""Generate a hash based on the callable's signature."""
286290
return hash(self.signature)
287-
288-
289291

290292

291293
@builder
@@ -309,6 +311,8 @@ class PyClass(BaseModel):
309311
signature: str # e.g., module.class_name
310312
comments: List[PyComment] = []
311313
code: str = None
314+
is_entrypoint: bool = False
315+
entrypoint_framework: Optional[str] = None
312316
base_classes: List[str] = []
313317
methods: Dict[str, PyCallable] = {}
314318
attributes: Dict[str, PyClassAttribute] = {}

0 commit comments

Comments
 (0)