/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/doc_generate/autodoc_rstx.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    t = time.time()
42
42
    tt = time.gmtime(t)
43
43
    params = \
44
 
           { "brzcmd": options.brz_name,
45
 
             "datestamp": time.strftime("%Y-%m-%d", tt),
46
 
             "timestamp": time.strftime("%Y-%m-%d %H:%M:%S +0000", tt),
47
 
             "version": breezy.__version__,
48
 
             }
 
44
        {"brzcmd": options.brz_name,
 
45
         "datestamp": time.strftime("%Y-%m-%d", tt),
 
46
         "timestamp": time.strftime("%Y-%m-%d %H:%M:%S +0000", tt),
 
47
         "version": breezy.__version__,
 
48
         }
49
49
    nominated_filename = getattr(options, 'filename', None)
50
50
    if nominated_filename is None:
51
51
        topic_dir = None
63
63
    registry = breezy.help_topics.topic_registry
64
64
    result = []
65
65
    result.append(_get_section(registry, SECT_CONCEPT, "Concepts",
66
 
        output_dir=topic_dir))
 
66
                               output_dir=topic_dir))
67
67
    result.append(_get_section(registry, SECT_LIST, "Lists",
68
 
        output_dir=topic_dir))
 
68
                               output_dir=topic_dir))
69
69
    result.append(_get_commands_section(registry, output_dir=topic_dir))
70
70
    return "\n".join(result)
71
71
 
72
72
 
73
73
def _get_section(registry, section, title, hdg_level1="#", hdg_level2="=",
74
 
        output_dir=None):
 
74
                 output_dir=None):
75
75
    """Build the manual part from topics matching that section.
76
 
    
 
76
 
77
77
    If output_dir is not None, topics are dumped into text files there
78
78
    during processing, as well as being included in the return result.
79
79
    """
101
101
 
102
102
 
103
103
def _get_commands_section(registry, title="Commands", hdg_level1="#",
104
 
        hdg_level2="=", output_dir=None):
 
104
                          hdg_level2="=", output_dir=None):
105
105
    """Build the commands reference section of the manual."""
106
106
    file_per_topic = output_dir is not None
107
107
    lines = [title, hdg_level1 * len(title), ""]