Pyright types fixes
Fixes various Pyright types errors.
fixes #5549
@davidism Ok I made a new combined issue and a new combined PR. Checks are passing. I left a note in this PR with a question. I will pause on any new code in this PR until I get initial review feedback.
Hi @davidism Anything I should change on this PR?
It looks like you don't have "Maintainers are allowed to edit this pull request." enabled, which means I can't push some additional fixes. I'll close this and open a new PR, unless you see this before I get there.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork
continued in #5620