79117933

Date: 2024-10-23 12:43:50
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Whitelisted phrase (-1): try this
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • User mentioned (1): @MyAnnotation
  • Low reputation (1):
Posted by: ujd8i2