Beyond just political correctness, there are practical reasons to use it/they/them instead of him/her/he/she. As a native English speaker, using gendered pronouns to talk about the code is confusing. If I were just scanning a commment, I'd assume those gendered pronouns were referring to an author of the code or some other individual being cited.
Anthropomorphizing your code in comments is a bad idea in general.
Anthropomorphizing your code in comments is a bad idea in general.