 
 (defvar python-pre-commit-database-cache nil)
 (defun python-pre-commit-virtualenv-path (hook-id)
-  (use-package emacsql-sqlite)
+  (use-package emacsql-sqlite :ensure t)
   (when-let* ((db-file (concat
                         (file-name-as-directory
                          (or (getenv "PRE_COMMIT_HOME")

                                   (concat (python-pre-commit-virtualenv-path "black") "/bin/black")))
                            ((and (python-use-poetry-p)
                                  (member "black" requirements))
                             (make-local-variable 'python-black-command)
                             (setf python-black-command "poetry")
                             (make-local-variable 'python-black--base-args)
                             (setf python-black--base-args (append '("run" "black") python-black--base-args)))
                            ((executable-find python-black-command)
                             t))
                  (python-black-on-save-mode 1))))

            (with-eval-after-load 'reformatter
              (let ((requirements (python-project-requirements)))
                (when (cond ((and (python-use-pre-commit-p requirements)
                                  (python-pre-commit-config-has-hook-p "isort"))
                             (setf python-isort-executable
                                   (concat (python-pre-commit-virtualenv-path "isort") "/bin/isort")))
                            ((and (python-use-poetry-p)
                                  (member "isort" requirements))
                             (setf python-isort-executable "poetry"
                                   python-isort-arguments
                                   (append '("run" "isort") python-isort-arguments)))
                            ((executable-find python-isort-executable)
                             (when (and python-black-command
                                        (executable-find python-black-command))
                               (setf python-isort-arguments
                                     (append '("--profile" "black") python-isort-arguments)))))
                  (python-isort-on-save-mode 1))))

            (use-package importmagic
              :delight
              :config
              (when (let ((requirements (python-project-requirements)))
                      (and (member "importmagic" requirements)
                           (member "epc" requirements)))

  :hook (cmake-mode . cmake-font-lock-activate))

;; Formatting
(use-package reformatter
  :quelpa (reformatter :fetcher github :repo "wyuenho/reformatter.el" :branch "post-processor")
  :config
  (reformatter-define yarn-eslint-format
    :program "yarn"
    :args `("--silent"
