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
示例#2
0
文件: flag_spec.py 项目: o11c/oil
    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]
示例#3
0
 def InitShopt(self):
     # type: () -> None
     self.actions_short['O'] = args.SetNamedOption(shopt=True)  # -O and +O
     self.plus_flags.append('O')
示例#4
0
 def InitOptions(self):
     # type: () -> None
     self.actions_short['o'] = args.SetNamedOption()  # -o and +o
     self.plus_flags.append('o')