Skip to content

Commit

Permalink
Revert "Use ParamSpec for better type hints"
Browse files Browse the repository at this point in the history
This reverts commit 9a3ec81.
  • Loading branch information
oleavr committed Oct 10, 2024
1 parent 6a18d4c commit 0b7bde2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions frida/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
else:
from typing_extensions import NotRequired

if sys.version_info >= (3, 10):
from typing import ParamSpec
else:
from typing_extensions import ParamSpec

from . import _frida

_device_manager = None
Expand Down Expand Up @@ -78,12 +73,11 @@ def _filter_missing_kwargs(d: MutableMapping[Any, Any]) -> None:


R = TypeVar("R")
P = ParamSpec("P")


def cancellable(f: Callable[P, R]) -> Callable[P, R]:
def cancellable(f: Callable[..., R]) -> Callable[..., R]:
@functools.wraps(f)
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
def wrapper(*args: Any, **kwargs: Any) -> R:
cancellable = kwargs.pop("cancellable", None)
if cancellable is not None:
with cancellable:
Expand Down

0 comments on commit 0b7bde2

Please sign in to comment.