summaryrefslogtreecommitdiff
path: root/sphinx/apidoc.py
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2015-04-05 19:11:38 +0900
committershimizukawa <shimizukawa@gmail.com>2015-04-05 19:11:38 +0900
commit1f65b8354e0282216d5b2489966fcda11c01a403 (patch)
treecaeec10629b79e9df4554713a762afc8deca5da7 /sphinx/apidoc.py
parent5a3fcea4b63934f696abac6614398c2c4799bfd5 (diff)
downloadsphinx-git-1f65b8354e0282216d5b2489966fcda11c01a403.tar.gz
refactoring. path.abspath will call path.normpath.
Diffstat (limited to 'sphinx/apidoc.py')
-rw-r--r--sphinx/apidoc.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index 5b9fe1286..10311e6f3 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -238,7 +238,7 @@ def recurse_tree(rootpath, excludes, opts):
def normalize_excludes(rootpath, excludes):
"""Normalize the excluded directory list."""
- return [path.normpath(path.abspath(exclude)) for exclude in excludes]
+ return [path.abspath(exclude) for exclude in excludes]
def is_excluded(root, excludes):
@@ -247,7 +247,6 @@ def is_excluded(root, excludes):
Note: by having trailing slashes, we avoid common prefix issues, like
e.g. an exlude "foo" also accidentally excluding "foobar".
"""
- root = path.normpath(root)
for exclude in excludes:
if root == exclude:
return True
@@ -328,7 +327,7 @@ Note: By default this script will not overwrite already created files.""")
if not opts.destdir:
parser.error('An output directory is required.')
if opts.header is None:
- opts.header = path.normpath(path.abspath(rootpath)).split(path.sep)[-1]
+ opts.header = path.abspath(rootpath).split(path.sep)[-1]
if opts.suffix.startswith('.'):
opts.suffix = opts.suffix[1:]
if not path.isdir(rootpath):
@@ -337,7 +336,7 @@ Note: By default this script will not overwrite already created files.""")
if not path.isdir(opts.destdir):
if not opts.dryrun:
os.makedirs(opts.destdir)
- rootpath = path.normpath(path.abspath(rootpath))
+ rootpath = path.abspath(rootpath)
excludes = normalize_excludes(rootpath, excludes)
modules = recurse_tree(rootpath, excludes, opts)
if opts.full: