mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
parent
fa74085afd
commit
a3f1489544
@ -265,12 +265,6 @@ def recurse_tree(rootpath, excludes, opts):
|
|||||||
return toplevels
|
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):
|
def is_excluded(root, excludes):
|
||||||
# type: (unicode, List[unicode]) -> bool
|
# type: (unicode, List[unicode]) -> bool
|
||||||
"""Check if the directory is in the exclude list.
|
"""Check if the directory is in the exclude list.
|
||||||
@ -390,7 +384,7 @@ def main(argv=sys.argv[1:]):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if not path.isdir(args.destdir) and not args.dryrun:
|
if not path.isdir(args.destdir) and not args.dryrun:
|
||||||
os.makedirs(args.destdir)
|
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)
|
modules = recurse_tree(rootpath, excludes, args)
|
||||||
|
|
||||||
if args.full:
|
if args.full:
|
||||||
|
Loading…
Reference in New Issue
Block a user