def __init__(self): # type: () -> None self.actions_short = { } # type: Dict[str, args._Action] # {'-c': _Action} self.actions_long = { } # type: Dict[str, args._Action] # {'--rcfile': _Action} self.defaults = {} # type: Dict[str, value_t] self.actions_short['o'] = args.SetNamedOption() # -o and +o self.actions_short['O'] = args.SetNamedOption(shopt=True) # -O and +O
def __init__(self, typed=False): # type: (bool) -> None self.spec = FlagSpecAndMore_() self.typed = typed self.actions_short = { } # type: Dict[str, args._Action] # {'-c': _Action} self.actions_long = { } # type: Dict[str, args._Action] # {'--rcfile': _Action} self.defaults = self.spec.defaults self.actions_short['o'] = args.SetNamedOption() # -o and +o self.actions_short['O'] = args.SetNamedOption(shopt=True) # -O and +O # For code generation. Not used at runtime. self.fields = {} # type: Dict[str, flag_type_t]
def InitShopt(self): # type: () -> None self.actions_short['O'] = args.SetNamedOption(shopt=True) # -O and +O self.plus_flags.append('O')
def InitOptions(self): # type: () -> None self.actions_short['o'] = args.SetNamedOption() # -o and +o self.plus_flags.append('o')