summaryrefslogtreecommitdiff
path: root/sphinx/ext/autosummary/generate.py
diff options
context:
space:
mode:
authorDaniel Eades <danieleades@hotmail.com>2022-01-09 16:58:49 +0000
committerAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-06-03 13:15:44 +0100
commit4e4813099bffde35b0c1d3f12eeac85420ad447b (patch)
tree9074a9965990647e2994c3b7a7295a488c40c639 /sphinx/ext/autosummary/generate.py
parent89210fc2756eaf0fc1bbcf3eccb7a9f9f690b820 (diff)
downloadsphinx-git-4e4813099bffde35b0c1d3f12eeac85420ad447b.tar.gz
remove unnecessary generators (C400, C401)
Diffstat (limited to 'sphinx/ext/autosummary/generate.py')
-rw-r--r--sphinx/ext/autosummary/generate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py
index 5d5e64b92..0e1daf79a 100644
--- a/sphinx/ext/autosummary/generate.py
+++ b/sphinx/ext/autosummary/generate.py
@@ -404,7 +404,7 @@ def generate_autosummary_docs(sources: List[str], output_dir: str = None,
else:
exceptions = exc.exceptions + [exc2]
- errors = list(set("* %s: %s" % (type(e).__name__, e) for e in exceptions))
+ errors = list({"* %s: %s" % (type(e).__name__, e) for e in exceptions})
logger.warning(__('[autosummary] failed to import %s.\nPossible hints:\n%s'),
entry.name, '\n'.join(errors))
continue
@@ -468,7 +468,7 @@ def find_autosummary_in_docstring(name: str, filename: str = None) -> List[Autos
except AttributeError:
pass
except ImportExceptionGroup as exc:
- errors = list(set("* %s: %s" % (type(e).__name__, e) for e in exc.exceptions))
+ errors = list({"* %s: %s" % (type(e).__name__, e) for e in exc.exceptions})
print('Failed to import %s.\nPossible hints:\n%s' % (name, '\n'.join(errors)))
except SystemExit:
print("Failed to import '%s'; the module executes module level "