Typing fixes
This commit is contained in:
parent
7ba62bb1cb
commit
deaac915bc
3 changed files with 4 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ STATIC const uint16_t triangle[] = {0, 32767, 0, -32767};
|
|||
//|
|
||||
//| def __init__(
|
||||
//| self,
|
||||
//| waveform: ReadableBuffer = None,
|
||||
//| waveform: ReadableBuffer,
|
||||
//| *,
|
||||
//| rate: BlockInput = 1.0,
|
||||
//| scale: BlockInput = 1.0,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static const mp_arg_t note_properties[] = {
|
|||
//| filter: Optional[Biquad] = None,
|
||||
//| ring_frequency: float = 0.0,
|
||||
//| ring_bend: float = 0.0,
|
||||
//| ring_waveform: Optional[ReadableBuffer] = 0.0,
|
||||
//| ring_waveform: Optional[ReadableBuffer] = None,
|
||||
//| ring_waveform_loop_start: int = 0,
|
||||
//| ring_waveform_loop_end: int = waveform_max_length,
|
||||
//| ) -> None:
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
rm -rf test-stubs
|
||||
python3 -m venv test-stubs
|
||||
. test-stubs/bin/activate
|
||||
pip install mypy isort black adafruit-circuitpython-typing wheel build
|
||||
pip install mypy isort black pip install adafruit-circuitpython-typing@git+https://github.com/justmobilize/Adafruit_CircuitPython_Typing@typing-fixes wheel build
|
||||
rm -rf circuitpython-stubs .mypy_cache
|
||||
make stubs
|
||||
pip install --force-reinstall circuitpython-stubs/dist/circuitpython-stubs-*.tar.gz
|
||||
export MYPYPATH=circuitpython-stubs/
|
||||
mypy -c 'import busio; b: busio.I2C; b.writeto(0x30, b"")'
|
||||
! mypy -c 'import busio; b: busio.I2C; b.readfrom_into(0x30, b"")'
|
||||
! mypy -c 'import busio; b: busio.I2C; b.write(0x30, b"")'
|
||||
|
|
|
|||
Loading…
Reference in a new issue