If this cannot be used with pyright (isntead of mypy), then what needs to happen so that it can be used with pyright?