diff options
| author | Augusto Stoffel | 2022-08-13 17:39:57 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-08-19 14:59:27 +0200 |
| commit | 275cef9e06b406c6e68ec5cf9fe882ab0fde8999 (patch) | |
| tree | fce3e37a12e2f4874c156acc77c5c2fdfc13548b /lisp/progmodes/python.el | |
| parent | ec347aec0fc7d2d3e6603b6694d9978cb9fcb9e9 (diff) | |
| download | emacs-275cef9e06b406c6e68ec5cf9fe882ab0fde8999.tar.gz emacs-275cef9e06b406c6e68ec5cf9fe882ab0fde8999.zip | |
python.el: Adjustments to Flymake backend
* lisp/progmodes/python (python-flymake-command): Advertise possiblity
to use pylint.
(python-flymake-command-output-pattern): Make compatible with recent
versions of pyflakes. (Bug#53913)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 285a57348e0..5fffb4b7d3d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5648,9 +5648,13 @@ returned as is." | |||
| 5648 | This is a non empty list of strings, the checker tool possibly followed by | 5648 | This is a non empty list of strings, the checker tool possibly followed by |
| 5649 | required arguments. Once launched it will receive the Python source to be | 5649 | required arguments. Once launched it will receive the Python source to be |
| 5650 | checked as its standard input. | 5650 | checked as its standard input. |
| 5651 | To use `flake8' you would set this to (\"flake8\" \"-\")." | 5651 | To use `flake8' you would set this to (\"flake8\" \"-\"). |
| 5652 | To use `pylint' you would set this to (\"pylint\" \"--from-stdin\" \"stdin\")." | ||
| 5652 | :version "26.1" | 5653 | :version "26.1" |
| 5653 | :type '(repeat string)) | 5654 | :type '(choice (const :tag "Pyflakes" ("pyflakes")) |
| 5655 | (const :tag "Flake8" ("flake8" "-")) | ||
| 5656 | (const :tag "Pylint" ("pylint" "--from-stdin" "stdin")) | ||
| 5657 | (repeat :tag "Custom command" string))) | ||
| 5654 | 5658 | ||
| 5655 | ;; The default regexp accommodates for older pyflakes, which did not | 5659 | ;; The default regexp accommodates for older pyflakes, which did not |
| 5656 | ;; report the column number, and at the same time it's compatible with | 5660 | ;; report the column number, and at the same time it's compatible with |
| @@ -5658,7 +5662,7 @@ To use `flake8' you would set this to (\"flake8\" \"-\")." | |||
| 5658 | ;; TYPE | 5662 | ;; TYPE |
| 5659 | (defcustom python-flymake-command-output-pattern | 5663 | (defcustom python-flymake-command-output-pattern |
| 5660 | (list | 5664 | (list |
| 5661 | "^\\(?:<?stdin>?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):\\)? \\(?3:.*\\)$" | 5665 | "^\\(?:<?stdin>?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):?\\)? \\(?3:.*\\)$" |
| 5662 | 1 2 nil 3) | 5666 | 1 2 nil 3) |
| 5663 | "Specify how to parse the output of `python-flymake-command'. | 5667 | "Specify how to parse the output of `python-flymake-command'. |
| 5664 | The value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if | 5668 | The value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if |
| @@ -5670,7 +5674,6 @@ MESSAGE'th gives the message text itself. | |||
| 5670 | If COLUMN or TYPE are nil or that index didn't match, that | 5674 | If COLUMN or TYPE are nil or that index didn't match, that |
| 5671 | information is not present on the matched line and a default will | 5675 | information is not present on the matched line and a default will |
| 5672 | be used." | 5676 | be used." |
| 5673 | :version "26.1" | ||
| 5674 | :type '(list regexp | 5677 | :type '(list regexp |
| 5675 | (integer :tag "Line's index") | 5678 | (integer :tag "Line's index") |
| 5676 | (choice | 5679 | (choice |
| @@ -5679,7 +5682,8 @@ be used." | |||
| 5679 | (choice | 5682 | (choice |
| 5680 | (const :tag "No type" nil) | 5683 | (const :tag "No type" nil) |
| 5681 | (integer :tag "Type's index")) | 5684 | (integer :tag "Type's index")) |
| 5682 | (integer :tag "Message's index"))) | 5685 | (integer :tag "Message's index")) |
| 5686 | :version "29.1") | ||
| 5683 | 5687 | ||
| 5684 | (defcustom python-flymake-msg-alist | 5688 | (defcustom python-flymake-msg-alist |
| 5685 | '(("\\(^redefinition\\|.*unused.*\\|used$\\)" . :warning)) | 5689 | '(("\\(^redefinition\\|.*unused.*\\|used$\\)" . :warning)) |