Closed Pi-Cla closed 5 months ago
hm. so they're interchangeable in this case, but get_flag is idiomatic?
hm. so they're interchangeable in this case, but get_flag is idiomatic?
The language was really confusing because contains_id is described as "Check if values are present for the argument or group id" and so I thought that was the intended command. But when I later reread the migration message today it says
With ArgAction::SetTrue becoming the new flag default in clap v4, flags will always be present.
Meaning is_present() would actually always return true, so get_flag() is the intended command.
Turns out get_flag is the intended command when checking whether a flag is present rather than contains_id