Repository navigation
stubs: type stubs for the twelve remaining modules - #404
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every native module now has a
.pyistub: audiobiquad, audiodelays, audiodynamics, audioecho, audiofilters, audiofreeverb, audiograph, audioladder, audiomixer, audioshaper, audiospeed and audioverb join the thirteen that had one. An editor completes their constructors, options, properties and constants, including audiograph's node kinds and the Mixer and node ramp options, and the wheel ships the stubs like the others. The stub test now covers all 25 modules, and the roadmap's stub item is removed.Each stub was written from the C source's globals and locals tables and argument parsing, so where a hand-written page disagreed the source won. The stubs' docstrings carry the behaviour those pages describe, ready for the Reference pages to be generated from them.
I ran mypy 2.4.1 over each stub, and the stub test against a MicroPython build that predates the level-ramp change: it passes for every module except
Mixer.level_ramp, which that build lacks, and renaming one method in a stub made it fail in both directions. I did not run the CPython half or the exact MicroPython half against a current build; the clean-build job does both.