return. There are cases where this makes sense, like when <body> contains only pass or .... However, for the majority of cases, this clearly won't type check. So, I'm not sure if it's a bug or intended behaviour.pyright produces the following error message: