Subject: Re: bug#56742: 29.0.50; Python indendation problem after comment

From: kobarity <[email-masked]>
Date: Wed, 27 Jul 2022 12:27:09 +0900

Hello Stephen and Lars,

Lars Ingebrigtsen <[email-masked]> wrote:
>
> Stephen Berman <[email-masked]> writes:
>
> > The attached patch prevents the wrong dedenting, but I'm not familiar
> > enough with the python.el code to be confident it's the correct fix.
>
> Perhaps Kobarity has some comments; added to the CCs.

I'm not so familiar with this part of python.el, but it looks good to me.
How about modifying the ERT to address this issue?

diff --git a/test/lisp/progmodes/python-tests.el
b/test/lisp/progmodes/python-tests.el
index 3b10bde23b..3828d4d5aa 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -1108,6 +1108,7 @@ python-indent-dedenters-2
     except Exception:
         if hide_details:
             logger.exception('Unhandled exception')
+        # comment
             else
     finally:
         data.free()