Function: python--import-sources

python--import-sources is a byte-compiled function defined in python.el.gz.

Signature

(python--import-sources)

Documentation

List files containing Python imports that may be useful in the current buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python--import-sources ()
  "List files containing Python imports that may be useful in the current buffer."
  (if-let* (((featurep 'project))        ;For compatibility with Emacs < 26
            (proj (project-current)))
      (seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s))
                  (project-files proj))
    (list default-directory)))