[Epydoc-commits] SF.net SVN: epydoc: [1585] trunk/epydoc/src/epydoc/cli.py
Brought to you by:
edloper
|
From: <dva...@us...> - 2007-03-14 01:53:15
|
Revision: 1585
http://svn.sourceforge.net/epydoc/?rev=1585&view=rev
Author: dvarrazzo
Date: 2007-03-13 18:53:14 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
- Fixed external API root and file: more than one can be specified now.
Modified Paths:
--------------
trunk/epydoc/src/epydoc/cli.py
Modified: trunk/epydoc/src/epydoc/cli.py
===================================================================
--- trunk/epydoc/src/epydoc/cli.py 2007-03-13 21:57:48 UTC (rev 1584)
+++ trunk/epydoc/src/epydoc/cli.py 2007-03-14 01:53:14 UTC (rev 1585)
@@ -506,7 +506,7 @@
if optname in ('modules', 'objects', 'values',
'module', 'object', 'value'):
- names.extend(val.replace(',', ' ').split())
+ names.extend(_str_to_list(val))
elif optname == 'target':
options.target = val
elif optname == 'output':
@@ -529,11 +529,11 @@
elif optname == 'introspect':
options.introspect = _str_to_bool(val, optname)
elif optname == 'exclude':
- options.exclude.append(val)
+ options.exclude.extend(_str_to_list(val))
elif optname in ('exclude-parse', 'exclude_parse'):
- options.exclude_parse.append(val)
+ options.exclude_parse.extend(_str_to_list(val))
elif optname in ('exclude-introspect', 'exclude_introspect'):
- options.exclude_introspect.append(val)
+ options.exclude_introspect.extend(_str_to_list(val))
elif optname == 'inheritance':
if val.lower() not in INHERITANCE_STYLES:
raise ValueError('"%s" expected one of: %s.' %
@@ -568,15 +568,15 @@
# External API
elif optname in ('external-api', 'external_api'):
- options.external_api.extend(val.replace(',', ' ').split())
+ options.external_api.extend(_str_to_list(val))
elif optname in ('external-api-file', 'external_api_file'):
- options.external_api_file.append(val)
+ options.external_api_file.extend(_str_to_list(val))
elif optname in ('external-api-root', 'external_api_root'):
- options.external_api_root.append(val)
+ options.external_api_root.extend(_str_to_list(val))
# Graph options
elif optname == 'graph':
- graphtypes = val.replace(',', '').split()
+ graphtypes = _str_to_list(val)
for graphtype in graphtypes:
if graphtype not in GRAPH_TYPES + ('all',):
raise ValueError('"%s" expected one of: all, %s.' %
@@ -589,7 +589,7 @@
elif optname in ('graph-font-size', 'graph_font_size'):
options.graph_font_size = _str_to_int(val, optname)
elif optname == 'pstat':
- options.pstat_files.extend(val.replace(',', ' ').split())
+ options.pstat_files.extend(_str_to_list(val))
# Return value options
elif optname in ('failon', 'fail-on', 'fail_on'):
@@ -620,6 +620,9 @@
except ValueError:
raise ValueError('"%s" option expected an int' % optname)
+def _str_to_list(val):
+ return val.replace(',', ' ').split()
+
######################################################################
#{ Interface
######################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|