feat: add codecs/warnings module

This commit is contained in:
Shunsuke Shibayama 2024-09-21 21:42:54 +09:00
parent 3366043a2d
commit cdabb2e546
3 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,52 @@
.CatchWarnings = 'catch_warnings': ClassType
.CatchWarnings.
__call__: () => CatchWarnings
.catch_warnings!: () => CatchWarnings
.warn!: (
message: Str,
category := Exception,
stacklevel := Nat,
source := Obj,
skip_file_prefixes := Iterable(Str),
) => NoneType
.warn_explicit!: (
message: Str,
category: Exception,
filename: Str,
lineno: Nat,
module := Str,
registry := GenericDict,
module_globals := GenericDict,
source := Obj,
) => NoneType
.showwarning!: (
message: Str,
category: Exception,
filename: Str,
lineno: Nat,
file := FileLike!,
line := Str,
) => NoneType
.formatwarning!: (
message: Str,
category: Exception,
filename: Str,
lineno: Nat,
line := Str,
) => Str
.filterwarnings!: (
action: Str,
message := Str,
category := Exception,
module := Str,
lineno := Nat,
append := Bool,
) => NoneType
.simplefilter!: (
action: Str,
category := Exception,
lineno := Nat,
append := Bool,
) => NoneType
.resetwarnings!: () => NoneType