diff options
Diffstat (limited to 'sphinx/ext/coverage.py')
-rw-r--r-- | sphinx/ext/coverage.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 362a644f5..6c70d4112 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -130,10 +130,10 @@ class CoverageBuilder(Builder): op.write('\n') def ignore_pyobj(self, full_name: str) -> bool: - for exp in self.py_ignorexps: - if exp.search(full_name): - return True - return False + return any( + exp.search(full_name) + for exp in self.py_ignorexps + ) def build_py_coverage(self) -> None: objects = self.env.domaindata['py']['objects'] |