bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62031: 29.0.60; python-mode indentation after re.match


From: Dmitry Gutov
Subject: bug#62031: 29.0.60; python-mode indentation after re.match
Date: Thu, 9 Mar 2023 17:40:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 09/03/2023 05:04, Ruijie Yu wrote:
As I mentioned in the other subthread, there is a variation to this
issue that remains unfixed.  The following test case, a slightly
modified version of the test case in your commit, has failed (tested on
7e1012765c40):

--8<---------------cut here---------------start------------->8---
(ert-deftest python-indent-after-bare-match ()
   (python-tests-with-temp-buffer
    "
from re import match
def test_re(string):
     if match('^[a-c]+$', string):
         print('yes')
     else:
     "
    (python-tests-look-at "else:")
    (should (= (python-indent-calculate-indentation) 4))))
--8<---------------cut here---------------end--------------->8---

That you for clarification with the full example

Does it belong to this bug report?  Or should I file a new bug instead?

It's the same piece of logic, I've pushed a fix in 29228e24f20 that makes the check stricter.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]