mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-19 13:51:01 +00:00
Add missing docstrings.
This commit is contained in:
parent
e0a2558b2b
commit
f3b435c2a6
3 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ from .director import console
|
|||
|
||||
|
||||
class LCArgumentParser(argparse.ArgumentParser):
|
||||
"""Custom argument parser to format help text."""
|
||||
|
||||
def print_help(self, file=None):
|
||||
"""Print a help message to stdout."""
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ _OctalPatt = re.compile(r"\\[0-3][0-7][0-7]")
|
|||
_QuotePatt = re.compile(r"[\\].")
|
||||
|
||||
def unquote(str):
|
||||
"""Remove string quoting."""
|
||||
# If there aren't any doublequotes,
|
||||
# then there can't be any special characters. See RFC 2109.
|
||||
if len(str) < 2:
|
||||
|
|
|
|||
|
|
@ -55,7 +55,10 @@ Epilog = u"\n".join((Retval, Examples))
|
|||
|
||||
# instantiate option parser and configure options
|
||||
class ArgumentParser(LCArgumentParser):
|
||||
"""Custom argument parser for error reporting."""
|
||||
|
||||
def error(self, message):
|
||||
"""Print error and exit with error code 3."""
|
||||
self.print_usage(sys.stderr)
|
||||
self.exit(3, _('%s: error: %s\n') % (self.prog, message))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue