diff --git a/chancy/executors/asyncex.py b/chancy/executors/asyncex.py index ec4c33b..f2117df 100644 --- a/chancy/executors/asyncex.py +++ b/chancy/executors/asyncex.py @@ -46,7 +46,7 @@ def __len__(self): async def _job_wrapper(self, job: QueuedJob): try: - func, kwargs = Executor.get_function_and_kwargs(job) + func, kwargs = self.get_function_and_kwargs(job) if not asyncio.iscoroutinefunction(func): raise ValueError( f"Function {job.func!r} is not an async function, which is" diff --git a/chancy/executors/sub.py b/chancy/executors/sub.py index 6bb91f3..c2311ad 100644 --- a/chancy/executors/sub.py +++ b/chancy/executors/sub.py @@ -24,7 +24,7 @@ "The SubInterpreterExecutor requires Python 3.13 or later." ) -from chancy.executors.base import Executor, ConcurrentExecutor +from chancy.executors.base import ConcurrentExecutor from chancy.job import QueuedJob, Limit @@ -105,7 +105,7 @@ def job_wrapper(cls, job: QueuedJob) -> tuple[QueuedJob, Any]: executor. It's responsible for setting up necessary limits, running the job, and returning the result. """ - func, kwargs = Executor.get_function_and_kwargs(job) + func, kwargs = cls.get_function_and_kwargs(job) time_limit = next( ( diff --git a/chancy/executors/thread.py b/chancy/executors/thread.py index df5ee74..8850682 100644 --- a/chancy/executors/thread.py +++ b/chancy/executors/thread.py @@ -5,7 +5,7 @@ import functools from typing import Any -from chancy.executors.base import Executor, ConcurrentExecutor +from chancy.executors.base import ConcurrentExecutor from chancy.job import QueuedJob, Limit @@ -60,7 +60,7 @@ def job_wrapper(self, job: QueuedJob) -> tuple[QueuedJob, Any]: executor. It's responsible for setting up necessary limits, running the job, and returning the result. """ - func, kwargs = Executor.get_function_and_kwargs(job) + func, kwargs = self.get_function_and_kwargs(job) time_limit = next( (