Skip to content

Commit

Permalink
Apply refurb/ruff rule FURB142
Browse files Browse the repository at this point in the history
[FURB142]: Replace `for x in y: s.add(docname)` with `s.update(y)`
  • Loading branch information
DimitriPapadopoulos committed Apr 9, 2024
1 parent 3421e53 commit 987ca79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sphinx/builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,7 @@ def build(

doccount = len(updated_docnames)
logger.info(bold(__('looking for now-outdated files... ')), nonl=True)
for docname in self.env.check_dependents(self.app, updated_docnames):
updated_docnames.add(docname)
updated_docnames.update(self.env.check_dependents(self.app, updated_docnames))
outdated = len(updated_docnames) - doccount
if outdated:
logger.info(__('%d found'), outdated)
Expand Down

0 comments on commit 987ca79

Please sign in to comment.