erg/crates/erg_compiler/lib/pystd/argparse.d.er
2023-02-17 15:15:11 +09:00

15 lines
517 B
Python

._StoreAction: ClassType
.ArgumentParser!: ClassType
.new = 'ArgumentParser': (description := Str, prog := Str) -> .ArgumentParser!
.ArgumentParser!.
add_argument!: (
name: Str, # TODO: var-args
action := Str or NoneType,
default := Obj or NoneType,
type := Type,
required := Bool,
help := Str or NoneType,
choices := Obj or NoneType,
) => ._StoreAction
.parse_args!: (args := Str or [Str; _] or NoneType,) => Obj # TODO: type with dependent types