sphinx-apidoc: Remove 'normalize_excludes' function

This is a one-liner that really doesn't need to be split out, so don't
do it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
Stephen Finucane 2017-06-04 11:44:23 +01:00
parent fa74085afd
commit a3f1489544

View File

@ -265,12 +265,6 @@ def recurse_tree(rootpath, excludes, opts):
return toplevels
def normalize_excludes(rootpath, excludes):
# type: (unicode, List[unicode]) -> List[unicode]
"""Normalize the excluded directory list."""
return [path.abspath(exclude) for exclude in excludes]
def is_excluded(root, excludes):
# type: (unicode, List[unicode]) -> bool
"""Check if the directory is in the exclude list.
@ -390,7 +384,7 @@ def main(argv=sys.argv[1:]):
sys.exit(1)
if not path.isdir(args.destdir) and not args.dryrun:
os.makedirs(args.destdir)
excludes = normalize_excludes(rootpath, args.exclude_pattern)
excludes = [path.abspath(exclude) for exclude in args.exclude_pattern]
modules = recurse_tree(rootpath, excludes, args)
if args.full: