text: Title: Verify `pyright` best practices
  Body: We've recently replaced mypy with pyright. Would be good to do a general check that we are following best practices, compare the new settings file with the previous mypy settings, increase the strictness as much as possible, etc...