From: Dale Sedivec <dale@codefu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: swedebugia <swedebugia@riseup.net>, 42513@debbugs.gnu.org
Subject: bug#42513: Python indentation bug when using multi-line on an if-condition
Date: Wed, 27 Jan 2021 12:20:32 -0600 [thread overview]
Message-ID: <D38B8535-E681-4321-886E-68833F49036E@codefu.org> (raw)
In-Reply-To: <87im7i98q4.fsf@gnus.org>
On Jan 27, 2021, at 00:47, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> swedebugia <swedebugia@riseup.net> writes:
>
>> The following code indents correctly:
>> def fun(arg):
>> if(
>> args.suppliername == "x"):
>> #do something
>> else:
>> #do something
>>
>> The following code does not indent correctly:
>> def fun(arg):
>> if(
>> args.suppliername == "Messingschlager" or
>> args.suppliercodename == "MS"
>> ): #<- culprit
>> #do something
>> else: #<- this else is not possible to indent 1 tab
>> #do something
>
> I tried this in Emacs 26.1 and Emacs 28, and both seem to indent the
> same, or am I missing something?
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".
(I am *guessing* the original reporter's code had at least one statement in the "if" block. It's not valid syntax otherwise.)
Dale
next prev parent reply other threads:[~2021-01-27 18:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 9:40 bug#42513: Python indentation bug when using multi-line on an if-condition swedebugia
2020-09-15 23:25 ` bug#42513: Possible fix for Python indentation problem Dale Sedivec
2021-01-27 6:47 ` bug#42513: Python indentation bug when using multi-line on an if-condition Lars Ingebrigtsen
2021-01-27 18:20 ` Dale Sedivec [this message]
2021-01-28 4:55 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D38B8535-E681-4321-886E-68833F49036E@codefu.org \
--to=dale@codefu.org \
--cc=42513@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=swedebugia@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.