Python 3.8 is inconsistent and buggy on this issue. I didn't test with higher versions
Python itself REQUIRES the correct indentation even for lines without content. For example try this (you need to define the @MyAnnotation but it does not do anything)
class ....
@MyAnnotation
'''
some comment
'''
def f(...):
...
Note the blank line has no whitespaces so 0 indentation. Python will give a syntax error on that line. You must add a whitespace on that line.
However, PIP thinks otherwise. If you make a package of this to create the.tar.gz file, and you pip install the.tar.gz file, all lines with only whitespace will be replaced with just a blank empty line. And then python gives the syntax error.