From c24f5cf65992caf106f3be3b2d584ddc940bd658 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Mon, 24 Jun 2024 18:36:19 +0100 Subject: [PATCH] py-autopep8 support --- README.rst | 1 + pet.el | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9677f0b..f615f21 100644 --- a/README.rst +++ b/README.rst @@ -88,6 +88,7 @@ Supported Emacs Packages - `python-isort `_ - `python-pytest `_ - `ruff-format `_ +- `py-autopep8 `_ System Requirements diff --git a/pet.el b/pet.el index c08c3a1..f81b3cd 100644 --- a/pet.el +++ b/pet.el @@ -925,6 +925,7 @@ FN is `eglot--guess-contact', ARGS is the arguments to (defvar ruff-format-command) (defvar blacken-executable) (defvar yapfify-executable) +(defvar py-autopep8-command) (defun pet-buffer-local-vars-setup () "Setup the buffer local variables for Python tools. @@ -951,6 +952,7 @@ buffer local values." (setq-local ruff-format-command (pet-executable-find "ruff")) (setq-local blacken-executable python-black-command) (setq-local yapfify-executable (pet-executable-find "yapf")) + (setq-local py-autopep8-command (pet-executable-find "autopep8")) (pet-eglot-setup)) @@ -976,6 +978,7 @@ buffer local values." (kill-local-variable 'ruff-format-command) (kill-local-variable 'blacken-executable) (kill-local-variable 'yapfify-executable) + (kill-local-variable 'py-autopep8-command) (pet-eglot-teardown)) @@ -1023,7 +1026,8 @@ has assigned to." blacken-executable python-isort-command ruff-format-command - yapfify-executable)))) + yapfify-executable + py-autopep8-command)))) (with-current-buffer-window "*pet info*" nil nil (mapc (pcase-lambda (`(,key . ,value))