* TYP: update mypy and small pyi fixes from ruff * fix errors * use pyright ignore comment (would prefer 'as TypeGuard') * disable PLC0414 * Revert "disable PLC0414" This reverts commit c0f7b2bf132ed9b63ee3c7d7e92044b46c40ba76.