10sr 5 лет назад
Родитель
Сommit
18c31685a5
Подписано: 10sr Идентификатор GPG ключа: 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)


Загрузка…
Отмена
Сохранить