I created a minimum failing example here with a workflow matrix that tests using mypy, pyright, pyre and pytype. Of all the type checkers, only pyright is able to properly evaluate the snippet without raising errors and properly infer the type of gain:
import pedalboard
# mypy: Name "pedalboard.Plugin" is not defined [name-defined]
# pyre: Undefined or invalid type [11]: Annotation `pedalboard.Plugin` is not defined as a type.
gain: pedalboard.Plugin
# mypy: Module has no attribute "Gain" [attr-defined]
# pyre: Undefined attribute [16]: Module `pedalboard` has no attribute `Gain`.
gain = pedalboard.Gain()
# mypy, pyre, pytype: Revealed type is "Any"
# pyright: Type of "gain" is "Gain"
reveal_type(gain)
I created a minimum failing example here with a workflow matrix that tests using
mypy
,pyright
,pyre
andpytype
. Of all the type checkers, onlypyright
is able to properly evaluate the snippet without raising errors and properly infer the type ofgain
:Versions:
pedalboard == 0.9.6
mypy == 1.10.0
pyright == 1.1.363
pyre-check == 0.9.21
pytype == 2024.4.11