403-python-mode.el: move to use python-black
* substitue y-autopep8 * python-black is actively developed Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -9,41 +9,21 @@
|
||||
(add-hook 'python-mode-hook
|
||||
(lambda ()
|
||||
(setq indent-tabs-mode nil) ; use only spaces and no tabs
|
||||
(setq python-indent-offset 4)
|
||||
;;(setq py-indent-offset 4) ; defaults to 4
|
||||
;;(setq indent-tabs-mode t) ; use tabs to indent
|
||||
;;(setq tabs-width 4) ;
|
||||
(add-to-list 'write-file-functions 'whitespace-cleanup)))
|
||||
|
||||
(use-package 'py-autopep8
|
||||
:custom
|
||||
(use-package python-black
|
||||
;; Be complient with PIP 8 -- Style Guide
|
||||
;; https://www.python.org/dev/peps/pep-0008/#indentation
|
||||
:demand t
|
||||
:custom
|
||||
(python-black-on-save-mode-enable-dwim))
|
||||
(use-package 'py-autopep8
|
||||
:custom
|
||||
;;(require 'py-autopep8)
|
||||
(py-autopep8-enable-on-save))
|
||||
)
|
||||
|
||||
;; (autoload 'python-mode "python-mode"
|
||||
;; "Major mode for the python programming language" t)
|
||||
|
||||
;; (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
|
||||
;; (add-to-list 'interpreter-mode-alist '("python" . python-mode))
|
||||
|
||||
;; ;; used, if working code is usings tabs (instead of PIP8 encuraged spaces)
|
||||
;; ;;(add-hook 'python-mode-hook 'guess-style-guess-tabs-mode)
|
||||
;; ;;(add-hook 'python-mode-hook (lambda ()
|
||||
;; ;; (guess-style-guess-tab-width)))
|
||||
|
||||
;; ;; Be complient with PIP 8 -- Style Guide
|
||||
;; ;; https://www.python.org/dev/peps/pep-0008/#indentation
|
||||
;; ;;(require 'py-autopep8)
|
||||
|
||||
;; (add-hook 'python-mode-hook
|
||||
;; (lambda ()
|
||||
;; (setq indent-tabs-mode nil) ; use only spaces and no tabs
|
||||
;; (setq python-indent-offset 4)
|
||||
;; ;;(setq indent-tabs-mode t) ; use tabs to indent
|
||||
;; ;;(py-autopep8-enable-on-save)
|
||||
;; (add-to-list 'write-file-functions 'whitespace-cleanup)))
|
||||
|
||||
|
||||
;;; 403-python-mode.el ends here
|
||||
|
||||
Reference in New Issue
Block a user