(defvar electric-indent-inhibit)
(defvar prettify-symbols-alist)
+(defvar python--installed-grep-hook nil)
;;;###autoload
(define-derived-mode python-base-mode prog-mode "Python"
"`outline-level' function for Python mode."
(1+ (/ (current-indentation) python-indent-offset))))
+ (unless python--installed-grep-hook
+ (setq python--installed-grep-hook t)
+ (with-eval-after-load 'grep
+ (defvar grep-files-aliases)
+ (defvar grep-find-ignored-directories)
+ (cl-pushnew '("py" . "*.py") grep-files-aliases :test #'equal)
+ (dolist (dir '(".tox" ".venv" ".mypy_cache" ".ruff_cache"))
+ (cl-pushnew dir grep-find-ignored-directories))))
+
(setq-local prettify-symbols-alist python-prettify-symbols-alist)
(make-local-variable 'python-shell-internal-buffer)