branch: elpa/flymake-pyrefly
commit 29cd3fc87161d042c3dd5ecf5995df082804dc6e
Author: Boris Shminke <bo...@shminke.com>
Commit: Boris Shminke <bo...@shminke.com>

    fix bug in regex
---
 flymake-pyrefly.el | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/flymake-pyrefly.el b/flymake-pyrefly.el
index eb992cd94d..a5f4668aa8 100644
--- a/flymake-pyrefly.el
+++ b/flymake-pyrefly.el
@@ -85,20 +85,19 @@
                       ;; of objects, and call `report-fn'.
                       (cl-loop
                        while (search-forward-regexp
-                              (rx line-start
-                                  ;; diagnostic level (error, warn, etc)
-                                  (group (one-or-more upper-case))
-                                  ;; file name
-                                  (one-or-more anything) ".py:"
-                                  ;; line number
-                                  (group (one-or-more digit)) ":"
-                                  ;; start column
-                                  (group (one-or-more digit)) "-"
-                                  ;; end column
-                                  (group (one-or-more digit)) ": "
-                                  ;; diagnostic message
-                                  (group (one-or-more anything))
-                                  line-end)
+                              (rx
+                               ;; diagnostic level (error, warn, etc)
+                               (group (one-or-more upper-case)) " "
+                               ;; file name
+                               (one-or-more (not space)) ".py:"
+                               ;; line number
+                               (group (one-or-more digit)) ":"
+                               ;; start column
+                               (group (one-or-more digit)) "-"
+                               ;; end column
+                               (group (one-or-more digit)) ": "
+                               ;; diagnostic message
+                               (group (one-or-more not-newline)))
                               nil t)
                        for msg = (match-string 5)
                        for beg = (cons (string-to-number (match-string 2))

Reply via email to