python: Fix generation of signal names for pin assignments.