-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add RC_2_0 Python type stubs #8007
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
base: RC_2_0
Are you sure you want to change the base?
Conversation
316466c to
9bb82cd
Compare
|
@qstokkink Why not use https://github.com/PyCQA/flake8-pyi (25.5.0) in pre-commit? |
9bb82cd to
15d6b0a
Compare
|
@xavier2k6 Because I presumed that only works if the repo has a Can you share a |
7a26b58 to
4f64a61
Compare
|
I marked this as "ready". Not because there is nothing left to change, but more because I'm already roughly 5k lines above what I think the maximum PR size should be (though most of this is in the 5,252 lines of the Python type stubs). |
|
you're making a lot of changes to the actual bindings themselves. I don't think that's reasonable, it really risks breaking compatibility. Is there a good reason to not just add type stubs for the existing bindings? |
Previously, only the first version of a PR had its wheels cached and used until the cache timed out. Even if there were changes to the files that should be in the wheels.
f6d11d6 to
b3172df
Compare
|
@arvidn Changed. I ripped all of the non-essential stuff out now. [EDIT] If you care about the reason: I figured that pulling in as much of the non-impactful changes as possible would make it easier to merge back from |
|
hi, any update on this? |
|
@stabldev You can download and play with the wheels of this PR (here: https://github.com/arvidn/libtorrent/actions/runs/17020524696?pr=8007). Feedback is welcome. It would be nice to have some "testimonials" that the typing is correct and useful. |
Fixes #7996
This PR cherry-picks the Python typing commits from
masterand fixes them up. There intent here is to NOT make any API changes, only to introduce typing. The first four commits are cherry-picked and only the second one (965d9f2) is rewritten.
check_wheel_type_exposureenforces both exposed type presence and type consistency..pre-commit-config.yaml:flake8-pyi-runenforces modern Python syntax in the stubs.bindings/python/to verify the typing (it is impossible to properly test types using a file that does not use types itself).