修复了大量存在的问题,增加了假鸭子类型等等机制
This commit is contained in:
28
Test/DecoratorMarkerTest/temp/73edbcf76e32d00b.pyi
Normal file
28
Test/DecoratorMarkerTest/temp/73edbcf76e32d00b.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdio.py
|
||||
Module: stdio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
def printf(fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fprintf(stream: t.CVoid | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def sprintf(buf: t.CChar | t.CPtr, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: t.CChar | t.CConst | t.CPtr, *args) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def puts(s: t.CChar | t.CConst | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fputs(s: t.CChar | t.CConst | t.CPtr, stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def fgets(buf: t.CChar | t.CPtr, size: t.CInt, stream: t.CVoid | t.CPtr) -> t.CChar | t.CPtr | t.CExtern | t.CExport: pass
|
||||
|
||||
def fflush(stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
|
||||
stdin: t.CExtern | t.CVoid | t.CPtr
|
||||
stdout: t.CExtern | t.CVoid | t.CPtr
|
||||
stderr: t.CExtern | t.CVoid | t.CPtr
|
||||
25
Test/DecoratorMarkerTest/temp/9dbecd0942a39782.pyi
Normal file
25
Test/DecoratorMarkerTest/temp/9dbecd0942a39782.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Auto-generated Python stub file from testcheck.py
|
||||
Module: testcheck
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
import stdio
|
||||
|
||||
_pass_count: t.CExtern | t.CInt
|
||||
_fail_count: t.CExtern | t.CInt
|
||||
|
||||
def begin(name: str) -> t.CInt: pass
|
||||
|
||||
def section(name: str) -> t.CInt: pass
|
||||
|
||||
def ok(msg: str) -> t.CInt: pass
|
||||
|
||||
def fail(msg: str) -> t.CInt: pass
|
||||
|
||||
def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass
|
||||
|
||||
def info(msg: str) -> t.CInt: pass
|
||||
|
||||
def end() -> t.CInt: pass
|
||||
3
Test/DecoratorMarkerTest/temp/_sha1_map.txt
Normal file
3
Test/DecoratorMarkerTest/temp/_sha1_map.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
73edbcf76e32d00b:includes/stdio.py
|
||||
9dbecd0942a39782:includes/testcheck.py
|
||||
b1122357fee8fd68:main.py
|
||||
36
Test/DecoratorMarkerTest/temp/b1122357fee8fd68.pyi
Normal file
36
Test/DecoratorMarkerTest/temp/b1122357fee8fd68.pyi
Normal file
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
Auto-generated Python stub file from main.py
|
||||
Module: main
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdio import printf
|
||||
import testcheck
|
||||
|
||||
@t.CStruct
|
||||
class Point:
|
||||
x: t.CInt
|
||||
y: t.CInt
|
||||
@t.CEnum
|
||||
class Color:
|
||||
RED = 1
|
||||
GREEN = 2
|
||||
BLUE = 3
|
||||
@t.CUnion
|
||||
class Data:
|
||||
i: t.CInt
|
||||
f: t.CFloat
|
||||
|
||||
@t.CExport
|
||||
def test() -> t.CInt: pass
|
||||
|
||||
@t.CStatic
|
||||
def static_func() -> t.CInt: pass
|
||||
|
||||
@t.CStatic
|
||||
def mixed_func() -> t.CInt | t.CExport: pass
|
||||
|
||||
def main() -> t.CInt: pass
|
||||
Reference in New Issue
Block a user