Skip to content

Commit 536a404

Browse files
Fixed typing annotations for dr.freeze
1 parent 3c541ed commit 536a404

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drjit/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1879,10 +1879,6 @@ def binary_search(start, end, pred):
18791879

18801880
return start
18811881

1882-
# Represents the type of the input arguments to the function
1883-
P = ParamSpec("P")
1884-
# Represents the Return value of the function
1885-
R = TypeVar("R")
18861882
# Represents the type of the state that is returned by ``state``
18871883
S = TypeVar("S")
18881884
# Represents the frozen function passed to the decorator without arguments
@@ -1891,9 +1887,7 @@ def binary_search(start, end, pred):
18911887
F2 = TypeVar("F2")
18921888

18931889
@overload
1894-
def freeze(
1895-
f: None = None, *, state: Callable[P, S]
1896-
) -> Callable[[Callable[P, R]], Callable[P, R]]:
1890+
def freeze(f: None = None, *, state: Callable[..., S]) -> Callable[[F], F]:
18971891
"""
18981892
Decorator to freeze a function for replaying kernels without compilation.
18991893

0 commit comments

Comments
 (0)