Look at these quotes below, from anti-gerrymandering opinions in the previous case. It's 'sometimes it does not', 'is sufficiently demonstrable', or 'sole motivator'. They are looking at degrees.
They are all accepting that partisan considerations are allowed in the process, but they are (in different ways) trying to pin down when it becomes too much in a way that a court can rule on,by tieing it to equal protection.
The use of purely political considerations in drawing district boundaries is not a “necessary evil” that, for lack of judicially manageable standards, the Constitution inevitably must tolerate. Rather, pure politics often helps to secure constitutionally important democratic objectives. But sometimes it does not. [...]
However equal districts may be in population as a formal matter, the consequence of a vote cast can be minimized or maximized, Karcher v. Daggett, 462 U. S. 725, 734, n. 6 (1983), and if unfairness is sufficiently demonstrable, the guarantee of equal protection condemns it as a denial of substantial equality.
In my view, when partisanship is the legislature’s sole motivation—when any pretense of neutrality is forsaken unabashedly and all traditional districting criteria are subverted for partisan advantage—the governing body cannot be said to have acted impartially.