branch: elpa/flymake-pyrefly
commit 85ed34cf74a1f6cf02e64a7167d04c305eb53d6c
Author: Boris Shminke <[email protected]>
Commit: Boris Shminke <[email protected]>

    make flymake-pyrefly binary arguments customizable
---
 flymake-pyrefly.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/flymake-pyrefly.el b/flymake-pyrefly.el
index 261e35405d4..93b6b24f79b 100644
--- a/flymake-pyrefly.el
+++ b/flymake-pyrefly.el
@@ -63,6 +63,11 @@
   "Pyrefly binary (with absolute or relative path)."
   :type 'file)
 
+(defcustom flymake-pyrefly-arguments
+  '("--output-format" "min-text" "--no-summary")
+  "Pyrefly binary command-line arguments."
+  :type '(repeat string))
+
 (defun pyrefly-flymake-backend (report-fn &rest _args)
   "Report pyrefly diagnostic with REPORT-FN."
   ;; Not having pyrefly installed is a serious problem which should cause
@@ -91,7 +96,8 @@
         ;; Make output go to a temporary buffer.
         :buffer (generate-new-buffer " *flymake-pyrefly*")
         :command
-        `(,flymake-pyrefly-binary-file "check" "--output-format" "min-text" 
"--no-summary" ,source-file-name)
+        `(,flymake-pyrefly-binary-file
+          "check" ,@flymake-pyrefly-arguments ,source-file-name)
         :sentinel
         (lambda (proc _event)
           ;; Check that the process has indeed exited, as it might

Reply via email to