Skip to content

fix: AsyncResult.as_list returns a list of task IDs - #231

Open
Sanjays2402 wants to merge 1 commit into
sbdchd:mainfrom
Sanjays2402:fix/async-result-as-list-str
Open

fix: AsyncResult.as_list returns a list of task IDs#231
Sanjays2402 wants to merge 1 commit into
sbdchd:mainfrom
Sanjays2402:fix/async-result-as-list-str

Conversation

@Sanjays2402

Copy link
Copy Markdown

Closes #226

AsyncResult.as_list was annotated as list[AsyncResult[Any]], but celery's implementation appends self.id and extends with the parent's as_list(), so it actually returns a list of task ID strings. Corrected to list[str], with an assert_type check added to tests/test_celery.py.

This change was prepared with AI assistance; the regression check was run locally and fails without the fix.

AsyncResult.as_list was annotated as returning list[AsyncResult[Any]],
but celery's implementation appends self.id and extends with the
parent's as_list(), so the runtime value is a list of task ID strings.

Corrected the annotation to list[str] and added an assert_type check
in tests/test_celery.py.

Closes sbdchd#226

@sbdchd sbdchd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sbdchd sbdchd added the automerge auto merge PRs using kodiak label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge auto merge PRs using kodiak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect return signature for AsyncResult.as_list

2 participants