 ;; -*- lexical-binding: t -*-
 (toggle-debug-on-error)
 
+(require 'cl-lib)
+(require 'filenotify)
+(require 'let-alist)
+(require 'map)
 (require 'pcase)
-(require 'map)
+(require 'rx)
 (require 'seq)
-(require 'cl-lib)
 (require 'subr-x)
-(require 'let-alist)
-(require 'rx)
 
 (set-locale-environment "UTF-8")
 (custom-autoload 'package-selected-packages "package")

(use-package importmagic
  :delight)

(add-hook 'python-mode-hook
          (lambda ()
            ;; Set `python-shell-interpreter'

(defvar python-pyproject-cache nil)
(defun python-parse-pyproject ()
  (let* ((pyproject-path (python-pyproject-path))
         (cache-value (assoc-default pyproject-path python-pyproject-cache)))
    (if cache-value
        cache-value
      (python-watch-config-file pyproject-path 'python-pyproject-cache 'python-parse-config-file)
      (when-let ((content (python-parse-config-file pyproject-path)))
        (push `(,pyproject-path . ,content) python-pyproject-cache)
        content))))

(defun python-use-pre-commit-p (requirements)
