コード例 #1
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
    def store_option_strings(self, parser):
        old_help_position = self.help_position
        HelpFormatter.store_option_strings(self, parser)
        new_help_position = self.help_position

        if new_help_position < old_help_position:
            self.help_position = old_help_position
コード例 #2
0
ファイル: userinput.py プロジェクト: Zahaib/ABRSim
 def __init__(self,
              indent_increment=1,
              max_help_position=48,
              width=200,
              short_first=1):
     HelpFormatter.__init__(self, indent_increment, max_help_position,
                            width, short_first)
コード例 #3
0
ファイル: szradm.py プロジェクト: notbrain/scalarizr
 def __init__(self,
              indent_increment=0,
              max_help_position=24,
              width=None,
              short_first=1):
     HelpFormatter.__init__(self, indent_increment, max_help_position,
                            width, short_first)
コード例 #4
0
ファイル: optik_ext.py プロジェクト: 173210/depot_tools
 def __init__ (self,
               indent_increment=0,
               max_help_position=24,
               width=79,
               short_first=0):
     HelpFormatter.__init__ (
         self, indent_increment, max_help_position, width, short_first)
コード例 #5
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
    def store_option_strings(self, parser):
        old_help_position = self.help_position
        HelpFormatter.store_option_strings(self, parser)
        new_help_position = self.help_position

        if new_help_position < old_help_position:
            self.help_position = old_help_position
コード例 #6
0
ファイル: userinput.py プロジェクト: Zahaib/ABRSim
 def __init__(self,
              indent_increment=1,
              max_help_position=48,
              width=200,
              short_first=1):
     HelpFormatter.__init__ (
         self, indent_increment, max_help_position, width, short_first)
コード例 #7
0
ファイル: uploadopts2wiki.py プロジェクト: eunchong/infra
 def __init__(self,
        indent_increment=2,
        max_help_position=24,
        width=None,
        short_first=1):
   HelpFormatter.__init__(
     self, indent_increment, max_help_position, width, short_first)
   self._dl_open = False
コード例 #8
0
ファイル: optik_ext.py プロジェクト: iqbalamr/tubes-basdat
 def __init__(
     self,
     indent_increment: int = 0,
     max_help_position: int = 24,
     width: int = 79,
     short_first: int = 0,
 ) -> None:
     HelpFormatter.__init__(self, indent_increment, max_help_position, width, short_first)
コード例 #9
0
ファイル: subbedopts.py プロジェクト: p-static/tahoe-lafs
    def format_option_strings(self, option):
        if hasattr(option, "subopt") and option.subopt:
            res = '-o ' + option.subopt
            if option.takes_value():
                res += "="
                res += option.metavar or 'FOO'
            return res

        return HelpFormatter.format_option_strings(self, option)
コード例 #10
0
ファイル: subbedopts.py プロジェクト: L3I-2021/roomdrop-dev
    def format_option_strings(self, option):
        if hasattr(option, "subopt") and option.subopt:
            res = '-o ' + option.subopt
            if option.takes_value():
                res += "="
                res += option.metavar or 'FOO'
            return res

        return HelpFormatter.format_option_strings(self, option)
コード例 #11
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
 def format_option_strings(self, option):
     if isinstance(option, GroupOption):
         if option.takes_value():
             metavar = option.metavar or option.dest.upper()
             return '%s=%s' % (
                 option._long_opts[0],
                 metavar,
             )
         else:
             return option._long_opts[0]
     else:
         return HelpFormatter.format_option_strings(self, option)
コード例 #12
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
 def format_option_strings(self, option):
     if isinstance(option, GroupOption):
         if option.takes_value():
             metavar = option.metavar or option.dest.upper()
             return '%s=%s' % (
               option._long_opts[0],
               metavar,
             )
         else:
             return option._long_opts[0]
     else:
         return HelpFormatter.format_option_strings(self, option)
コード例 #13
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
 def __init__(self, *args, **kwargs):
     HelpFormatter.__init__(self, *args, **kwargs)
     self.help_position = 0
コード例 #14
0
ファイル: uploadopts2wiki.py プロジェクト: eunchong/infra
 def indent(self):
   self._pending = 'INDENT'
   HelpFormatter.indent(self)
コード例 #15
0
ファイル: optgroup.py プロジェクト: wadoon/pytagsfs
 def __init__(self, *args, **kwargs):
     HelpFormatter.__init__(self, *args, **kwargs)
     self.help_position = 0
コード例 #16
0
 def dedent(self):
     self._pending = 'DEDENT'
     HelpFormatter.dedent(self)
コード例 #17
0
 def indent(self):
     self._pending = 'INDENT'
     HelpFormatter.indent(self)
コード例 #18
0
ファイル: uploadopts2wiki.py プロジェクト: eunchong/infra
 def dedent(self):
   self._pending = 'DEDENT'
   HelpFormatter.dedent(self)