Subject: bug#42513: Python indentation bug when using multi-line on an if-condition

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 28 Jan 2021 05:55:51 +0100

Dale Sedivec <[email-masked]> writes:

> If I use something other than a comment following the "if" statement
> line, I can reproduce the original behavior in a master build from
> yesterday.  For example, replace "#do something" with "''" (an empty
> string) or just "bar".

Indeed:

def fun(arg):
    if(                                                     
            args.suppliername == "x"):
        foo
    else:
        foo

def fun(arg):
    if(                                                   
            args.suppliername == "Messingschlager" or          
            args.suppliercodename == "MS"
    ):
        foo
else:
    foo

> (I am *guessing* the original reporter's code had at least one
> statement in the "if" block.  It's not valid syntax otherwise.)

However, both these examples indent the same for me in Emacs 26.1 and
Emacs 28 (wrong in the same way), so I'm still not seeing what the
original reporter is seeing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no