VS Code is not my preferred editor and I don't use Mac, so I have no idea if it supports such a hotkey for Python on that OS. I use PyCharm on Win10, which per it's default hotkey layout has Ctrl + ]
to jump to the end of a code block. It works for jumping to the end of a function so long as your whitespace is correct throughout and your cursor is on a line that starts on the outermost indent of the function's scope. If it is on an inner indented line (like in a loop or context manager) then it jumps to the end of that indented block.
Edit: Just found the mac keybindings for PyCharm. On that OS the hot key for jumping to an end of a block is ? ??]
whatever the heck that is.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…