Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .pyi typing for asyncio #134

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Conversation

dkang-quora
Copy link
Contributor

No description provided.

@dkang-quora dkang-quora marked this pull request as draft November 17, 2023 15:29
@JelleZijlstra
Copy link
Contributor

It might be worth running mypy's stubtest tool in CI to confirm the stubs are correct. We could also move the annotations inline instead of using .pyi files, but that might interfere with Cython.

I think I originally created the stub files because asynq at the time still supported Python 2.

@dkang-quora dkang-quora marked this pull request as ready for review November 17, 2023 16:50
@dkang-quora
Copy link
Contributor Author

dkang-quora commented Nov 17, 2023

Briefly tested on the internal codebase.

stubtest produces too many errors that are unrelated to asyncio.

> stubtest asynq

...

error: asynq.decorators.__pyx_capi__ is not present in stub
Stub: in file asynq/asynq/decorators.pyi
MISSING
Runtime:
{'_debug_options': <capsule object "struct __pyx_obj_5asynq_6_debug_DebugOptions *" at 0x7f9eb376...

error: asynq.decorators.__test__ is not present in stub
Stub: in file asynq/decorators.pyi
MISSING
Runtime:
{}

error: asynq.decorators.__traceback_hide__ is not present in stub
Stub: in file asynq/decorators.pyi
MISSING
Runtime:
True

...

Found 268 errors (checked 42 modules)

@dkang-quora dkang-quora marked this pull request as draft November 22, 2023 09:04
@dkang-quora dkang-quora marked this pull request as ready for review November 22, 2023 09:05
@JelleZijlstra JelleZijlstra merged commit a600bf5 into quora:master Nov 23, 2023
10 checks passed
@dkang-quora dkang-quora deleted the asyncio-pyi branch November 27, 2023 19:02
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.

2 participants