Skip to content

Commit ee2f8ea

Browse files
committed
Avoid multiline comprehension
1 parent 6c1a048 commit ee2f8ea

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

autoapi/inheritance_diagrams.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def _import_class(name, currmodule):
4242
return [target]
4343

4444
if isinstance(target, astroid.Module):
45-
return [
46-
child
47-
for child in target.get_children()
48-
if isinstance(child, astroid.ClassDef)
49-
]
45+
classes = []
46+
for child in target.get_children():
47+
if isinstance(child, astroid.ClassDef):
48+
classes.append(child)
49+
return classes
5050

5151
raise sphinx.ext.inheritance_diagram.InheritanceException(
5252
f"{name} specified for inheritance diagram is not a class or module"

docs/changes/490.misc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix ruff compressions and performance issues, limit new version of sphinx, add Py312,Py313 to trove classifiers
1+
Fix ruff compressions and performance issues.

0 commit comments

Comments
 (0)