Lines Matching defs:Flag
126 class Flag(object):
127 """The information about a single flag."""
130 """Create the flag object.
147 # match the start of a flag listing
158 # match the start of a flag listing
165 # match the start of a flag listing
278 flag = None
288 if flag:
289 modlist.append(flag)
293 flag = None
297 if mobj: # start of a new flag
298 if flag:
299 modlist.append(flag)
300 logging.debug('Flag: %s' % line)
301 flag = Flag(mobj.group(1), mobj.group(2))
304 if not flag: # continuation of a flag
305 logging.error('Flag info, but no current flag "%s"' % line)
308 flag.default = mobj.group(1)
313 flag.tips = mobj.group(1)
316 if flag and flag.help:
317 flag.help += line # multiflags tack on an extra line
320 if flag:
321 modlist.append(flag)
327 flag = None
331 if flag: # save last flag
332 modlist.append(flag)
333 flag = None
340 if flag:
341 modlist.append(flag)
345 flag = None
349 if mobj: # start of a new flag
350 if flag: # save last flag
351 modlist.append(flag)
352 logging.debug('Flag: %s' % line)
353 flag = Flag(mobj.group(1), mobj.group(2))
356 # append to flag help. type and default are part of the main text
357 if flag:
358 flag.help += ' ' + line.strip()
361 if flag:
362 modlist.append(flag)
372 flag = None
378 if flag: # save last flag
379 modlist.append(flag)
380 flag = None
387 if flag:
388 modlist.append(flag)
392 flag = None
396 if mobj: # start of a new flag
397 if flag: # save last flag
398 modlist.append(flag)
399 logging.debug('Flag: %s' % line)
400 flag = Flag(mobj.group(1), mobj.group(2))
403 # append to flag help. type and default are part of the main text
404 if flag:
405 flag.help += ' ' + line.strip()
408 if flag:
409 modlist.append(flag)
505 for flag in self.info.modules[modname]:
506 help_string = flag.help
507 if flag.default or flag.tips:
509 if flag.default:
510 help_string += ' (default: \'%s\')' % flag.default
511 if flag.tips:
512 help_string += ' (%s)' % flag.tips
514 '.TP\n%s\n%s\n' % (flag.desc, help_string))