mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-13 16:15:15 +00:00
15 lines
517 B
Python
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
|