File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 77import time
88from os import path
99from typing import TYPE_CHECKING , Any
10- from fnmatch import fnmatch , translate
10+ from fnmatch import fnmatch
1111
1212from docutils import nodes
1313from docutils .utils import DependencyList
@@ -423,12 +423,14 @@ def read(self) -> list[str]:
423423 if self .config .root_doc not in self .env .all_docs :
424424 root_doc_path = self .env .doc2path (self .config .root_doc )
425425 if ("**" in self .config .exclude_patterns or
426- any ([fnmatch (root_doc_path , pat ) or root_doc_path .endswith (pat ) for pat in self .config .exclude_patterns ])):
426+ any (fnmatch (root_doc_path , pat ) or root_doc_path .endswith (pat )
427+ for pat in self .config .exclude_patterns )):
427428 raise SphinxError ('customized exclude_patterns is set ' +
428429 'and root file %s is in the exclude_patterns' %
429430 root_doc_path )
430431 elif ("**" not in self .config .include_patterns and
431- not any ([(fnmatch (root_doc_path , pat ) or root_doc_path .endswith (pat )) for pat in self .config .include_patterns ])):
432+ not any ((fnmatch (root_doc_path , pat ) or root_doc_path .endswith (pat ))
433+ for pat in self .config .include_patterns )):
432434 raise SphinxError ('customized include_patterns is set, ' +
433435 'but root file %s is not in the include_patterns' %
434436 root_doc_path )
You can’t perform that action at this time.
0 commit comments