Skip to content

Commit e24a17a

Browse files
author
Eviee Py
committed
Add aiter and deco to attributetable.
1 parent 9fd2c68 commit e24a17a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/_extensions/attributetable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ def get_class_results(
248248
badge = attributetablebadge("cls", "cls")
249249
badge["badge-type"] = _("classmethod")
250250
elif inspect.isfunction(value):
251-
if doc.startswith(("A decorator", "A shortcut decorator")):
251+
if doc.startswith(("A decorator", "A shortcut decorator", "|deco|")):
252252
# finicky but surprisingly consistent
253253
key = _("Methods")
254254
badge = attributetablebadge("@", "@")
255255
badge["badge-type"] = _("decorator")
256-
elif inspect.isasyncgenfunction(value):
256+
elif inspect.isasyncgenfunction(value) or doc.startswith("|aiter|"):
257257
key = _("Methods")
258258
badge = attributetablebadge("async for", "async for")
259259
badge["badge-type"] = _("async iterable")

0 commit comments

Comments
 (0)