Typechecker stdlib module :shipit:
This commit is contained in:
parent
6f8b5a4e96
commit
5316cff2a2
6 changed files with 736 additions and 1709 deletions
9
test_.py
Normal file
9
test_.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue