Labelling an entire city as "left-leaning" is a perfectly reasonable and quotidian practice. For instance, if over a period of time, City A generally voted for left-leaning politicians and passed left-leaning referenda, while City B generally voted for right-leaning politicians and passed right-leaning referenda, most people would think it was fair to characterize City A as "left-leaning" and City B as "right-leaning".
I'm guessing by the including of "entire" you are confused about the meaning of "leaning"? It means that on average, compared to some larger (e.g. national) mean, the population of a city has views that are to the left of that mean. It doesn't mean every single person has left views on every single issue.
It's a very widely shared perception that San Francisco was left-leaning for the latter half of the 20th century into the beginning of the current. Early San Francisco was dominated by a relatively conservative patrician elite but over time it earned its "Baghdad-By-The-Bay" (https://www.amazon.com/Baghdad-Bay-Herb-Caen/dp/0891740473) reputation from things like electing the first openly-gay man to political office in America (https://en.wikipedia.org/wiki/Harvey_Milk) to being the epicenter of the sociocultural phenomenon known as "The Summer of Love" (https://en.wikipedia.org/wiki/Summer_of_Love).