Permalink
Browse files

strip whitespace from configurable help

  • Loading branch information...
1 parent 77c24b4 commit e6204a77aef7ac15dc4dbcc45f3b4330e5e30e5e @minrk committed May 30, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 IPython/config/application.py
  2. +1 −1 IPython/config/configurable.py
@@ -207,7 +207,7 @@ def print_flag_help(self):
for m, (cfg,help) in self.flags.iteritems():
lines.append('--'+m)
- lines.append(indent(help, flatten=True))
+ lines.append(indent(help.strip(), flatten=True))
lines.append('')
print '\n'.join(lines)
@@ -221,7 +221,7 @@ def print_subcommands(self):
for subc, (cls,help) in self.subcommands.iteritems():
lines.append("%s : %s"%(subc, cls))
if help:
- lines.append(indent(help, flatten=True))
+ lines.append(indent(help.strip(), flatten=True))
lines.append('')
print '\n'.join(lines)
@@ -165,7 +165,7 @@ def class_get_trait_help(cls, trait):
help = trait.get_metadata('help')
if help is not None:
- lines.append(indent(help, flatten=True))
+ lines.append(indent(help.strip(), flatten=True))
if 'Enum' in trait.__class__.__name__:
# include Enum choices
lines.append(indent('Choices: %r'%(trait.values,), flatten=True))

0 comments on commit e6204a7

Please sign in to comment.