<commit_before>(setq auto-mode-alist
      (append '(("SConstruct\\'" . python-mode)
                ("SConscript\\'" . python-mode))
              auto-mode-alist))

(setq python-shell-interpreter "python2")

(require-package 'pip-requirements)
(require-package 'indent-guide)

(after-load 'lsp-pyls
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-tramp-connection
                                   (lambda () lsp-clients-python-command))
                  :major-modes '(python-mode cython-mode)
                  :priority -1
                  :remote? t
                  :server-id 'pyls-remote
                  :library-folders-fn (lambda (_workspace) lsp-clients-python-library-directories)
                  :initialized-fn (lambda (workspace)
                                    (with-lsp-workspace workspace
                                      (lsp--set-configuration (lsp-configuration-section "pyls")))))))

(add-hook 'python-mode-hook (lambda ()
                              (setq-local lsp-enable-save-format nil)
                              (lsp-later)
                              (indent-guide-mode)))
(provide 'init-python)
<commit_msg>add lsp-python-set-extra-path<commit_after>(setq auto-mode-alist
      (append '(("SConstruct\\'" . python-mode)
                ("SConscript\\'" . python-mode))
              auto-mode-alist))

(setq python-shell-interpreter "python2")

(require-package 'pip-requirements)
(require-package 'indent-guide)

(after-load 'lsp-pyls
  (lsp-register-client
   (make-lsp-client :new-connection (lsp-tramp-connection
                                   (lambda () lsp-clients-python-command))
                  :major-modes '(python-mode cython-mode)
                  :priority -1
                  :remote? t
                  :server-id 'pyls-remote
                  :library-folders-fn (lambda (_workspace) lsp-clients-python-library-directories)
                  :initialized-fn (lambda (workspace)
                                    (with-lsp-workspace workspace
                                      (lsp--set-configuration (lsp-configuration-section "pyls")))))))

(defun lsp-python-set-extra-path (paths)
  (lsp-register-custom-settings
   `(("pyls.plugins.jedi.extra_paths" ,paths))))

(add-hook 'python-mode-hook (lambda ()
                              (setq-local lsp-enable-save-format nil)
                              (require 'lsp)
                              (lsp-later)
                              (indent-guide-mode)))
(provide 'init-python)

{'fraction_non_alphanumeric': 0.12874015748031495, 'fraction_numerical': 0.0015748031496062992, 'mean_word_length': 1.535928143712575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '467742', 'n_tokens_mistral': 749, 'n_tokens_neox': 727, 'n_words': 117}