فهرست منبع

Add type annotations for VTableFunction

nosoop 11 ماه پیش
والد
کامیت
11597cd501
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/smgdc/vtable.py

+ 3 - 1
src/smgdc/vtable.py

@@ -92,7 +92,9 @@ def get_vtables_from_address(bin: "LinuxBinary", vt: Symbol) -> list[VTable]:
     vtda = bin.vtable_disambiguator
 
     # returns a list of vtables for each vtable present on the class
-    VTableFunction = collections.namedtuple("VTableFunction", "tblidx sym")
+    class VTableFunction(typing.NamedTuple):
+        tblidx: int
+        sym: Symbol
 
     table_index = 0
     function_list: list[VTableFunction] = []