 (require 'cl-lib)
 (require 'subr-x)
 (require 'let-alist)
+(require 'rx)
 
 (set-locale-environment "UTF-8")
 (custom-autoload 'package-selected-packages "package")

          (assoc-default file-path python-project-requirements-cache)))
    (unless requirements
      (setf requirements
            (flatten-list
             (mapcar 'python-parse-requirement-spec
                     (condition-case err
                         (or (and (python-use-poetry-p)
                                  (process-lines "poetry" "run" "pip" "list" "--format=freeze"))
                             (python-project-requirements-from-file)
                             (process-lines "pip" "list" "--format=freeze"))
                       (file-error (and (message "%s" (error-message-string err)) nil))))))
      (assoc-delete-all file-path python-project-requirements-cache)
      (push (cons file-path requirements) python-project-requirements-cache))
    requirements))

(add-hook 'kill-buffer-hook

  :hook (python-mode . sphinx-doc-mode))

(use-package python-black
  :delight python-black-on-save-mode
  :quelpa (python-black :fetcher github :repo "wyuenho/emacs-python-black" :branch "blackd"))

(use-package python-isort)

(use-package importmagic
  :delight)
