Typechecker stdlib module :shipit:

This commit is contained in:
Xander Mckay 2024-11-30 10:29:08 -05:00
parent 6f8b5a4e96
commit 5316cff2a2
6 changed files with 736 additions and 1709 deletions

9
test_.py Normal file
View file

@ -0,0 +1,9 @@
import std.typecheck as tc
import typing
OptionalString = str | None
print(tc.checktype("wow", OptionalString))
print(tc.checktype(None, OptionalString))
print(tc.checktype(0xDEADBEEF, OptionalString))
@tc.check_args
def a(a:int,b:str,c:typing.Any):...
a(1,"",1223)