Consistently use Dataclass syntac for AssignmentInfo and related classes

This commit is contained in:
Pragyansh Chaturvedi
2025-10-25 05:10:47 +05:30
parent 028d9c2c08
commit 96216d4411
2 changed files with 14 additions and 15 deletions

View File

@ -1,12 +1,11 @@
from enum import Enum, auto
from typing import Any, Dict, List, Optional, TypedDict
from typing import Any, Dict, List, Optional
from dataclasses import dataclass
import llvmlite.ir as ir
from pythonbpf.vmlinux_parser.dependency_node import Field
@dataclass
class AssignmentType(Enum):
CONSTANT = auto()
STRUCT = auto()
@ -16,7 +15,7 @@ class AssignmentType(Enum):
@dataclass
class FunctionSignature(TypedDict):
class FunctionSignature:
return_type: str
param_types: List[str]
varargs: bool
@ -24,7 +23,7 @@ class FunctionSignature(TypedDict):
# Thew name of the assignment will be in the dict that uses this class
@dataclass
class AssignmentInfo(TypedDict):
class AssignmentInfo:
value_type: AssignmentType
python_type: type
value: Optional[Any]