When it comes to legislators, particularly at the federal level, I would vote for an incompetent Democrat before I would vote for a well-qualified Republican. I would do this even if I agreed with more of the Republican's stated positions than the Democrat's. And I believe I am on firm rational footing with this.
In the United States -- as in most representative democracies, it turns out -- legislative voting is nearly always virtually party-line. I mean, hell, we even have an official position in each party, recognized by congressional regulations if I'm not mistaken, dedicated to making sure this remains the case!
And while individual candidates might have their own quirks, it is a fact that my positions and values are far more in line with the Democratic Party platform than they are with the GOP platform. I disagree with the Democrats on a number of issues, but geez, it's not even a close call here.
So in the hypothetical introduced in the first paragraph, if this highly-qualified Republican legislator gets elected, so what? Most of her votes will still be along party lines, and therefore will be for positions that I disagree with. And if the incompetent Democratic gets elected, most of his votes will be for positions I agree with, even if he himself is an idiot. Even those representatives who have the biggest reputation for being "mavericks" (God, how that word has become tainted) still vote with their party something like upwards of 90% of the time.
This argument is less applicable when it comes to executive branch positions, and doesn't hold at all for judicial positions. (Why the hell do we elect judges anyway? That just seems like a patently stupid idea to me... but I digress) But when it comes to legislators, you bet your sweet bippy I'm voting Democrat, no matter who the candidates are, and I make no apologies for it.