Add missing docstrings

This commit is contained in:
Marek Marczykowski-Górecki 2017-05-11 20:43:42 +02:00
parent 1b7a58b84b
commit 78c28a70e9
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 5 additions and 0 deletions

View File

@ -47,10 +47,12 @@ OPTIONS_TITLE = 'OPTIONS'
def make_rst_section(heading, char):
'''Format a section header in rst'''
return '{}\n{}\n\n'.format(heading, char[0] * len(heading))
def prepare_manpage(command):
'''Build a man page skeleton'''
parser = qubesmgmt.tools.get_parser_for_command(command)
stream = io.StringIO()
stream.write('.. program:: {}\n\n'.format(command))
@ -282,6 +284,7 @@ def check_man_args(app, doctree, docname):
def break_to_pdb(app, *dummy):
'''DEBUG'''
if not app.config.break_to_pdb:
return
import pdb
@ -289,6 +292,7 @@ def break_to_pdb(app, *dummy):
def setup(app):
'''Setup Sphinx extension'''
app.add_config_value('break_to_pdb', False, 'env')
app.connect('doctree-resolved', break_to_pdb)

View File

@ -32,6 +32,7 @@ import qubesmgmt.tools.qvm_prefs
def get_parser():
'''Prepare argument parser'''
return qubesmgmt.tools.qvm_prefs.get_parser(None)