Skip to content

Conversation

@s3rius
Copy link
Member

@s3rius s3rius commented Feb 26, 2025

This PR fixes type issues introduced by a new pyright update.

In https://github.com/microsoft/pyright/releases/tag/1.1.394 they have made a change that breaks return_type inference for kicked tasks:

Changed the type of an async def function from typing.Coroutine to types.CoroutineType for improved type accuracy.

This PR addresses this behavior and now return_value of the result shows correct types.

@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.80%. Comparing base (528c2db) to head (826c31e).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
taskiq/decor.py 80.00% 1 Missing ⚠️
taskiq/scheduler/created_schedule.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #413      +/-   ##
==========================================
- Coverage   77.82%   77.80%   -0.03%     
==========================================
  Files          62       62              
  Lines        1926     1933       +7     
==========================================
+ Hits         1499     1504       +5     
- Misses        427      429       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@s3rius s3rius changed the title Fixed type inference for new versions of pyright. Fixed type inference for new versions of pyright and dependencies were updated. Feb 26, 2025
Copy link
Member

@chandr-andr chandr-andr left a comment

Choose a reason for hiding this comment

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

Awesome PR.

@s3rius s3rius merged commit a89cac1 into master Feb 26, 2025
68 checks passed
@s3rius s3rius deleted the bugfix/result-types branch February 26, 2025 22:44
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.

3 participants