Skip to content

Commit f071540

Browse files
committed
Added TypeVar for return type of the inline decorator function
1 parent d732ef9 commit f071540

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyndustri.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from abc import ABC
2-
from typing import Iterator, Any, Callable
2+
from typing import Iterator, TypeVar, Callable
33

44
class Link:
55
"""Represents a link."""
@@ -707,8 +707,8 @@ def sleep(secs: float):
707707
"""
708708
Sleep for the given amount of seconds.
709709
"""
710-
711-
def inline(func: Callable[..., Any]) -> Callable[..., Any]:
710+
T = TypeVar('T')
711+
def inline(func: Callable[..., T]) -> Callable[..., T]:
712712
"""Compile the function by copy/pasting the code into each function call"""
713713

714714
def flip(a: int) -> int:

0 commit comments

Comments
 (0)