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

Add type stubs for Cython files #1594

Merged
merged 7 commits into from
Aug 22, 2024
Merged

Conversation

e10e3
Copy link
Contributor

@e10e3 e10e3 commented Aug 22, 2024

Adding type stubs for C extension modules enables type checker to verify the calls made to these modules. They are ignored by the Python interpreter when running the program.
The type stubs here are not all type-complete.

Their addition also allows re-enabling missing imports checks for the river package. Without the stubs, checkers like MyPy would complain about not being able to find the C extension modules.

I also fixed the definition of __pow__ from vectordict.pyx to bring it in line with its signature in Python. The modulo parameter was unused.

Copy link
Member

@MaxHalford MaxHalford left a comment

Choose a reason for hiding this comment

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

This is insane, thanks a lot!

I'm curious to know your background and how you to came to find River :)

@MaxHalford MaxHalford merged commit bd0e31b into online-ml:main Aug 22, 2024
4 checks passed
@e10e3 e10e3 deleted the type-stubs-cython branch August 22, 2024 13:13
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