[py] Remove noqa markers and fix linting (#16676)

NOKEYCHECK=True
GitOrigin-RevId: c60cfe6915e258bc8ad626d57d2ffd15b0f6d0c7
2 files changed