/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/commands.py

  • Committer: Martin
  • Date: 2017-11-12 13:53:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6810.
  • Revision ID: gzlist@googlemail.com-20171112135351-uyr1ncw7visg62c2
Apply 2to3 ws_comma fixer

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
 
188
188
 
189
189
def _unsquish_command_name(cmd):
190
 
    return cmd[4:].replace('_','-')
 
190
    return cmd[4:].replace('_', '-')
191
191
 
192
192
 
193
193
def _register_builtin_commands():
559
559
            doc = gettext("No help for this command.")
560
560
 
561
561
        # Extract the summary (purpose) and sections out from the text
562
 
        purpose,sections,order = self._get_help_parts(doc)
 
562
        purpose, sections, order = self._get_help_parts(doc)
563
563
 
564
564
        # If a custom usage section was provided, use it
565
565
        if 'Usage' in sections:
670
670
        summary = lines.pop(0)
671
671
        sections = {}
672
672
        order = []
673
 
        label,section = None,''
 
673
        label, section = None, ''
674
674
        for line in lines:
675
675
            if line.startswith(':') and line.endswith(':') and len(line) > 2:
676
676
                save_section(sections, order, label, section)
677
 
                label,section = line[1:-1],''
 
677
                label, section = line[1:-1], ''
678
678
            elif (label is not None) and len(line) > 1 and not line[0].isspace():
679
679
                save_section(sections, order, label, section)
680
 
                label,section = None,line
 
680
                label, section = None, line
681
681
            else:
682
682
                if len(section) > 0:
683
683
                    section += '\n' + line