Syntax errors in the Python source files give 2 when they should give 1, as exit code. 1 means the files have a problem, while 2 should mean a usage error.
I haven't verified myself where this is a problem; at the moment I'm relying on second-hand info from @sterliakov
Originally posted by @wyattscarpenter in #19548