After some (a lot) of guidance on how it can fix all the errors in it's code, Chat GPT made me a working Toggle Edge Constraint hotkey script for Maya 2020. I learned a lot! For anyone else who would like this hotkey: key='s' is the hotkey set part.