It also applies to any .py file. (At least in practice with e.g. pyright)
That said, the documentation on this matter is close to nonexistent.