Summary
It's fairly common for .py files to have "stub-like sections" of code that are added just for a type checker's benefit. These "stub-like sections" generally do not have any function bodies (just ...), and are generally guarded by if TYPE_CHECKING. As an example, see this code in the trio library: https://github.com/python-trio/trio/blob/ac7b93f05796d49f324b231b3b2751facd34bc3a/src/trio/_file_io.py#L300-L344.
We shouldn't emit invalid-return-type for functions like this that are inside if TYPE_CHECKING blocks; we should omit checking these functions for that lint, just like we do for actual stub files.