Skip to content

Commit 46a10ce

Browse files
committed
Revert "Enhance @task's return value type hint"
This reverts commit 70ba324. Yea...this was, in fact, /worse/ for reasons I don't have time to deep dive into. Time to stop trying to make things better for a bit...
1 parent f45bfaf commit 46a10ce

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

invoke/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def get_arguments(
286286
return args
287287

288288

289-
def task(*args: Any, **kwargs: Any) -> Union[Task[T], Callable[[Callable], Task[T]]]:
289+
def task(*args: Any, **kwargs: Any) -> Callable:
290290
"""
291291
Marks wrapped callable object as a valid Invoke task.
292292

sites/www/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Changelog
33
=========
44

5+
- :support:`- backported` Reverted the `@task
6+
<invoke.tasks.task>` return value type hint change; it actually just makes
7+
things worse. Taking this one back to the drawing table for later.
58
- :release:`3.0.2 <2026-04-06>`
69
- :support:`- backported` Make the return value type hint for `@task
710
<invoke.tasks.task>` more specific; as-is it would trigger typecheck errors

0 commit comments

Comments
 (0)