There's nothing mutually exclusive about non-discimination and diversity. They won't take the grant money because they want to drive a politicized agenda, to the detriment of the Python community as a whole.
Speaking of politicized agendas, I note that you are asserting without evidence that they have a secret motive other than the one states while also assuming that the administration’s interpretation of the relevant contract language will be fair and aboveboard despite the observed evidence.
Their position is logically inconsistent. If they are worried about being eventually targeted by the Trump administration, they have done more to paint a target on their back now then they ever could've done by quietly accepting the money.
I don't believe they intended for their motive to be secret at all. This was an opportunity to bring attention to their political position.