fix(stub): .vpi 将 t./c. 前缀类型还原为裸名
生成 stub 时 t.CPtr 等输出为 CPtr,避免 .vpi 中残留 t./c. 模块前缀。
This commit is contained in:
1 parent
a8718aa751
commit
700a0ba602
1 file changed
+2
@@ -677,6 +677,8 @@ class PythonToStubConverter:
|
||||
return annotation.id
|
||||
elif isinstance(annotation, ast.Attribute):
|
||||
if isinstance(annotation.value, ast.Name):
|
||||
if annotation.value.id in ('t', 'c'):
|
||||
return annotation.attr
|
||||
return f'{annotation.value.id}.{annotation.attr}'
|
||||
else:
|
||||
# 处理嵌套属性访问,如 attr.packed
|
||||
|
||||
Reference in new issue
Block a user