I just did some testing and as far as I can tell, the ruling party has no direct effect on threat; I tried declaring war with a right-wing party in power, reloaded and used the console to trigger an election that put a democratic party in power, declared the same war and threat generation was the same.
Ruling party (and not the type of government) does determine the "ideological similarity" diplomatic drift factor, and after a bunch of tests I can safely say that position in the diplomatic triangle is one of the biggest components of threat (along with being factioned or not, and proximity). Playing Romania and declaring war on a neighbor while fully aligned to Axis (but not in the faction) generated ~15 threat to the Allies, which turned out to be a nasty surprise; if I declared war at their initial alignment (slightly Axis) I only generated 5 threat. I then tag switched to various other countries with noneutrality and confirmed that the farther Axis a DoW'ing country was, the larger the threat generation towards the Allies, and lower towards the Axis (alignment of the target didn't seem to matter).
Threat increasing with spies doesn't seem to care as much about the degree of alignment as DoWs do though, just which side in general you and the target are on. The very instant you drift across the halfway point between Axis and Allies the spy threat comes to a screeching halt for countries on your new side and takes off for the other.