Skip to content

Commit 401778e

Browse files
committed
add callable type to demo decorator
- use collections.abc.Callable for `demo` typing Signed-off-by: mimir-d <[email protected]>
1 parent 20ccb47 commit 401778e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import collections.abc as abc
2+
13
DEMOS = {}
24

35

4-
def demo(func):
5-
def w(banner=True):
6+
def demo(func) -> abc.Callable[[], None]:
7+
def w(banner=True) -> None:
68
if banner:
79
print("-" * 80)
810
print(func.__name__)

0 commit comments

Comments
 (0)