Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris K committed Sep 13, 2012
1 parent 34fb990 commit d737a08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion df2/minirest.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def handle(self, text_node, match):
span.parent.set_attr("class", "note")
return span


class LinkTextProcessor(TextProcessor):
re = reg_exp(r"[^ ]{4,5}://[^ ]+")
name = "a"
Expand Down
13 changes: 7 additions & 6 deletions df2/scopedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,15 @@ def print_event(fp, event):
def print_service(fp, services, service):
fp.write(HEAD % (service.name, service.version))
fp.write(H1 % (service.name, service.version))
cmds = service.command_names
evs = service.event_names
fp.write(SIDEPANEL % ("\n".join((SIDEPANLE_LINK % (cmd, cmd) for cmd in cmds)),
"\n".join((SIDEPANLE_LINK % (ev, ev) for ev in evs))))
commands = service.command_names
events = service.event_names
command_links = (SIDEPANLE_LINK % (cmd, cmd) for cmd in commands)
event_links = (SIDEPANLE_LINK % (ev, ev) for ev in events)
fp.write(SIDEPANEL % ("".join(command_links), "".join(event_links)))
fp.write("<div class=\"main-view\">\n")
if service.doc: print_doc(fp, service)
for cmd in cmds: print_command(fp, getattr(service, cmd))
for ev in evs: print_event(fp, getattr(service, ev))
for cmd in commands: print_command(fp, getattr(service, cmd))
for ev in events: print_event(fp, getattr(service, ev))
fp.write("</div>\n")

def print_index(fp, services_dict, dest):
Expand Down

0 comments on commit d737a08

Please sign in to comment.