It is in several states including CA and NY, where most tech firms are located.
Yeah, it isn't, but that's a bit surprising since in many other places the same specific legal definition explicitly does include political affiliation for obvious reasons e.g. so that the employers couldn't fire someone for being a member of some labor rights or communist party or even a candidate from them.