mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with stable
This commit is contained in:
commit
04746ffea9
2
CHANGES
2
CHANGES
@ -137,7 +137,7 @@ Bugs fixed
|
||||
* #848: Always take the newest code in incremental rebuilds with the
|
||||
:mod:`sphinx.ext.viewcode` extension.
|
||||
|
||||
* #979: Fix exclude handling in ``sphinx-apidoc``.
|
||||
* #979, #1266: Fix exclude handling in ``sphinx-apidoc``.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
@ -182,6 +182,7 @@ def recurse_tree(rootpath, excludes, opts):
|
||||
|
||||
toplevels = []
|
||||
followlinks = getattr(opts, 'followlinks', False)
|
||||
includeprivate = getattr(opts, 'includeprivate', False)
|
||||
for root, subs, files in os.walk(rootpath, followlinks=followlinks):
|
||||
# document only Python module files (that aren't excluded)
|
||||
py_files = sorted(f for f in files
|
||||
@ -197,7 +198,11 @@ def recurse_tree(rootpath, excludes, opts):
|
||||
continue
|
||||
# remove hidden ('.') and private ('_') directories, as well as
|
||||
# excluded dirs
|
||||
subs[:] = sorted(sub for sub in subs if sub[0] not in ['.', '_']
|
||||
if includeprivate:
|
||||
exclude_prefixes = ('.',)
|
||||
else:
|
||||
exclude_prefixes = ('.', '_')
|
||||
subs[:] = sorted(sub for sub in subs if not sub.startswith(exclude_prefixes)
|
||||
and not is_excluded(path.join(root, sub), excludes))
|
||||
|
||||
if is_pkg:
|
||||
|
@ -537,6 +537,7 @@ class DefinitionParser(object):
|
||||
'mutable': None,
|
||||
'const': None,
|
||||
'typename': None,
|
||||
'struct': None,
|
||||
'unsigned': set(('char', 'short', 'int', 'long')),
|
||||
'signed': set(('char', 'short', 'int', 'long')),
|
||||
'short': set(('int',)),
|
||||
|
Loading…
Reference in New Issue
Block a user