10sr преди 5 години
родител
ревизия
18c31685a5
Подписан от: 10sr GPG ключ ID: 7BEC428194130EB2
променени са 1 файла, в които са добавени 17 реда и са изтрити 12 реда
  1. +17
    -12
      emacs.el

+ 17
- 12
emacs.el Целия файл

@@ -2037,24 +2037,29 @@ initializing."
(config-file "--config" flycheck-black)
source)
:error-parser flycheck-parse-black-check
;; :error-patterns
;; (
;; (error line-start "error: cannot format " (file-name) ": " (message) ": " line ":" column ": " (one-or-more any) line-end)
;; (error line-start (message) " " (file-name) line-end)
;; )
:enabled (lambda ()
(or (not (flycheck-python-needs-module-p 'python-black-check))
(flycheck-python-find-module 'python-black-check "black")))
:verify (lambda (_) (flycheck-python-verify-module 'python-black-check "black"))
:modes python-mode)

'(flycheck-define-checker python-black-diff
"A Python style checker."
:command ("python3"
"-m" "black"
(config-file "--config" flycheck-black)
"--diff" source)
:error-parser my-flycheck-parse-unified-diff
:enabled (lambda ()
(or (not (flycheck-python-needs-module-p 'python-black))
(flycheck-python-find-module 'python-black "black")))
:verify (lambda (_) (flycheck-python-verify-module 'python-black "black"))
:modes python-mode)
;; (flycheck-define-checker python-black-diff
;; "A Python style checker."
;; :command ("python3"
;; "-m" "black"
;; (config-file "--config" flycheck-black)
;; "--diff" source)
;; :error-parser my-flycheck-parse-unified-diff
;; :enabled (lambda ()
;; (or (not (flycheck-python-needs-module-p 'python-black))
;; (flycheck-python-find-module 'python-black "black")))
;; :verify (lambda (_) (flycheck-python-verify-module 'python-black "black"))
;; :modes python-mode)

(flycheck-def-config-file-var flycheck-black python-black-check "pyproject.toml"
:safe #'stringp)


Зареждане…
Отказ
Запис