You don't! Or at least I didn't. Slowly finding habits that help me care for myself on a somewhat regular basis. Accepting I have limits and moderating my activity accordingly. Modifying my environment to keep me on track enough.
Make doing things important to me easy and saying goodbye to lower priority stuff I can't manage. Finding a balance I can keep. Being realistic about what I can and can't commit to.
Python now has type hints, which are not the same as static typing. Those hints do not change program operation. See https://peps.python.org/pep-3107/
You can pass a string to a function parameter annotated as int and Python will happily accept it (assuming the function does not attempt to call a method that a string doesn't have).
Copyright usually exists simply by them writing the comment. By adding a license they are communicating to others under what terms the comment is being made available to you .
Hurray!!