mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refactor: Use set.union() to combine set objects
This commit is contained in:
parent
96e1c70b39
commit
9d7b1b756a
@ -22,7 +22,7 @@ from os import path
|
|||||||
from docutils.frontend import OptionParser
|
from docutils.frontend import OptionParser
|
||||||
from docutils.utils import Reporter, get_source_line
|
from docutils.utils import Reporter, get_source_line
|
||||||
from six import BytesIO, itervalues, class_types, next
|
from six import BytesIO, itervalues, class_types, next
|
||||||
from six.moves import cPickle as pickle, reduce
|
from six.moves import cPickle as pickle
|
||||||
|
|
||||||
from sphinx import addnodes, versioning
|
from sphinx import addnodes, versioning
|
||||||
from sphinx.deprecation import RemovedInSphinx20Warning
|
from sphinx.deprecation import RemovedInSphinx20Warning
|
||||||
@ -914,7 +914,7 @@ class BuildEnvironment(object):
|
|||||||
def check_consistency(self):
|
def check_consistency(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
"""Do consistency checks."""
|
"""Do consistency checks."""
|
||||||
included = reduce(lambda x, y: x | y, self.included.values(), set()) # type: Set[unicode] # NOQA
|
included = set().union(*self.included.values()) # type: ignore
|
||||||
for docname in sorted(self.all_docs):
|
for docname in sorted(self.all_docs):
|
||||||
if docname not in self.files_to_rebuild:
|
if docname not in self.files_to_rebuild:
|
||||||
if docname == self.config.master_doc:
|
if docname == self.config.master_doc:
|
||||||
|
Loading…
Reference in New Issue
Block a user