Skip to content

Commit 24304fe

Browse files
committed
also cythonized py3.10 special case
1 parent a1a8107 commit 24304fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

logwrap/repr_utils.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ cdef class PrettyFormat:
191191
sig = inspect.signature(src)
192192
if sig.return_annotation is inspect.Parameter.empty:
193193
annotation = ""
194+
elif sig.return_annotation is type(None): # noqa: E721
195+
# Python 3.10 special case
196+
annotation = " -> None"
194197
else:
195198
annotation = f" -> {getattr(sig.return_annotation, '__name__', sig.return_annotation)!s}"
196199

0 commit comments

Comments
 (0)