We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
type
default
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
According to argparse docs on that matter,
If the type keyword is used with the default keyword, the type converter is only applied if the default is a string.
I'm trying to parse datetime, expect the input (and generated help) to be in %Y-%mformat.
%Y-%m
class Args(tap.TypedArgs): gen_conf: bool = tap.arg("--gen-conf",help="generate example config",default=False) since: datetime = tap.arg(default=datetime.strftime("%Y-%m"), type=datetime.strptime) # str | datetime
couldn't type have proprity over default in this case? or, if type is a -> T and default is a, couldn't default be "type-applied" against type?
a -> T
a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
According to argparse docs on that matter,
I'm trying to parse datetime, expect the input (and generated help) to be in
%Y-%m
format.couldn't
type
have proprity overdefault
in this case? or, iftype
isa -> T
anddefault
isa
, couldn'tdefault
be "type-applied" againsttype
?The text was updated successfully, but these errors were encountered: