Variable: python-flymake-command-output-pattern
python-flymake-command-output-pattern is a customizable variable
defined in python.el.gz.
Value
("^\\(?:<?stdin>?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):?\\)? \\(?3:.*\\)$" 1 2 nil 3)
Documentation
Specify how to parse the output of python-flymake-command.
The value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if REGEXP matches, the LINE'th subexpression gives the line number, the COLUMN'th subexpression gives the column number on that line, the TYPE'th subexpression gives the type of the message and the MESSAGE'th gives the message text itself.
If COLUMN or TYPE are nil or that index didn't match, that information is not present on the matched line and a default will be used.
This variable was added, or its default value changed, in Emacs 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
;; The default regexp accommodates for older pyflakes, which did not
;; report the column number, and at the same time it's compatible with
;; flake8 output, although it may be redefined to explicitly match the
;; TYPE
(defcustom python-flymake-command-output-pattern
(list
"^\\(?:<?stdin>?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):?\\)? \\(?3:.*\\)$"
1 2 nil 3)
"Specify how to parse the output of `python-flymake-command'.
The value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if
REGEXP matches, the LINE'th subexpression gives the line number,
the COLUMN'th subexpression gives the column number on that line,
the TYPE'th subexpression gives the type of the message and the
MESSAGE'th gives the message text itself.
If COLUMN or TYPE are nil or that index didn't match, that
information is not present on the matched line and a default will
be used."
:type '(list regexp
(integer :tag "Line's index")
(choice
(const :tag "No column" nil)
(integer :tag "Column's index"))
(choice
(const :tag "No type" nil)
(integer :tag "Type's index"))
(integer :tag "Message's index"))
:version "29.1")