GitHub

API reference for Flag.

A flag of a command, as data: aliases, negation and scope as well as its type.

Attributes

AttributeTypeDescription
aliasestuple[str, ...]

Alias names without dashes.

hiddenbool
optional_valuestr | None
negationstr | None

The long name that sets a boolean flag to false.

scopeScope

Functions

__init__

__init__(name, description, type, type_name, metavar, required, fallbacks, variadic, annotations, aliases, hidden, optional_value, negation, scope) -> None
ParameterTypeDescription
namestr
descriptionstr | None
typeType
type_namestr
metavarstr | None
requiredbool
fallbackstuple[Fallback, ...]
variadicVariadicBounds | None
annotationsContext[Any]
aliasestuple[str, ...]
hiddenbool
optional_valuestr | None
negationstr | None
scopeScope