comparison piecrust/commands/builtin/info.py @ 161:516db87a04d4

cosmetic: pep8 compliance.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 01 Jan 2015 21:10:16 -0800
parents 10fc9c8bf682
children c4b155b08b52
comparison
equal deleted inserted replaced
160:de09d41bae23 161:516db87a04d4
23 23
24 class ShowConfigCommand(ChefCommand): 24 class ShowConfigCommand(ChefCommand):
25 def __init__(self): 25 def __init__(self):
26 super(ShowConfigCommand, self).__init__() 26 super(ShowConfigCommand, self).__init__()
27 self.name = 'showconfig' 27 self.name = 'showconfig'
28 self.description = "Prints part of, or the entirety of, the website's configuration." 28 self.description = ("Prints part of, or the entirety of, "
29 "the website's configuration.")
29 30
30 def setupParser(self, parser, app): 31 def setupParser(self, parser, app):
31 parser.add_argument('path', 32 parser.add_argument(
33 'path',
32 help="The path to a config section or value", 34 help="The path to a config section or value",
33 nargs='?') 35 nargs='?')
34 36
35 def run(self, ctx): 37 def run(self, ctx):
36 show = ctx.app.config.get(ctx.args.path) 38 show = ctx.app.config.get(ctx.args.path)
88 super(FindCommand, self).__init__() 90 super(FindCommand, self).__init__()
89 self.name = 'find' 91 self.name = 'find'
90 self.description = "Find pages in the website." 92 self.description = "Find pages in the website."
91 93
92 def setupParser(self, parser, app): 94 def setupParser(self, parser, app):
93 parser.add_argument('pattern', 95 parser.add_argument(
96 'pattern',
94 help="The pattern to match with page slugs", 97 help="The pattern to match with page slugs",
95 nargs='?') 98 nargs='?')
96 parser.add_argument('--endpoint', 99 parser.add_argument(
100 '--endpoint',
97 help="The endpoint(s) to look into", 101 help="The endpoint(s) to look into",
98 nargs='+') 102 nargs='+')
99 parser.add_argument('--full-path', 103 parser.add_argument(
104 '--full-path',
100 help="Return full paths instead of root-relative paths", 105 help="Return full paths instead of root-relative paths",
101 action='store_true') 106 action='store_true')
102 parser.add_argument('--metadata', 107 parser.add_argument(
108 '--metadata',
103 help="Return metadata about the page instead of just the path", 109 help="Return metadata about the page instead of just the path",
104 action='store_true') 110 action='store_true')
105 111
106 def run(self, ctx): 112 def run(self, ctx):
107 pattern = ctx.args.pattern 113 pattern = ctx.args.pattern