Among the five fields analyzed, History has the highest ratio of Democrat-to-Republican professors at nearly 34 to one. [Source.]Yes, you read that correctly. 34 to 1. While I believe it is possible that a history professor (Democrat or Republican) can keep his personal political preferences completely out of the classroom, I also believe that it is highly improbable. You can draw your own conclusions about this reality. Others have already done so. And there have been numerous books written on the topic as well. For example.
Of course, this doesn't necessarily mean one cannot learn from someone of either political preference (right or left), but what one does need to keep in mind is that leftist preferences are dominant among academic historians. There is no political diversity (of any consequence) among academic historians. To pretend that this is not something to both consider and be concerned about is bordering on the delusional.