Skip to content

Conversation

@VegetarianOrc
Copy link
Contributor

@VegetarianOrc VegetarianOrc commented Sep 30, 2025

What was changed

Use type instead of Type in start_activity, execute_activity, start_workflow, and execute_workflow

Why?

The overloads that allow for a result type to optionally be passed were causing the pyright linter to evaluate the result type to unknown when not specified.

Checklist

  1. Closes [Bug] Pyright (strict mode) fails on start/execute activity/workflow calls #893 Closes [Bug] Pyright typing issue #795

  2. How was this tested:

  3. Any docs updates needed?

@VegetarianOrc VegetarianOrc force-pushed the bug/fix-pyright-partial-unknown branch from 8d46d6e to 4ec4889 Compare September 30, 2025 19:01
@VegetarianOrc VegetarianOrc marked this pull request as ready for review October 1, 2025 17:57
@VegetarianOrc VegetarianOrc requested a review from a team as a code owner October 1, 2025 17:57
@VegetarianOrc VegetarianOrc changed the title Use Explicit Any in start_activity and execute_activity to address Pyright Strict mode error Use type in start/execute activity/workflow to address Pyright Strict mode error Oct 1, 2025
id: str,
task_queue: str,
result_type: Optional[Type] = None,
result_type: Optional[Any] = None,
Copy link
Member

Choose a reason for hiding this comment

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

Can this one (and the concrete impl's signature) be left as type too instead of changing to Any?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely, not sure how I missed those the first go around 😅

@VegetarianOrc VegetarianOrc merged commit 4f08626 into main Oct 2, 2025
15 checks passed
@VegetarianOrc VegetarianOrc deleted the bug/fix-pyright-partial-unknown branch October 2, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Pyright (strict mode) fails on start/execute activity/workflow calls [Bug] Pyright typing issue

4 participants