<commit_before>
(require-package 'jedi)

(add-hook 'python-mode-hook 'jedi:setup)
(if (not (file-directory-p "~/.emacs.d/.python-environments/default/"))
	(jedi:install-server))

;;
(provide 'env-python-mode)<commit_msg>python-mode: s-r now runs code<commit_after>
(require-package 'jedi)
(if (not (file-directory-p "~/.emacs.d/.python-environments/default/"))
	(jedi:install-server))

(add-hook 'python-mode-hook 'jedi:setup)
(add-hook 'python-mode-hook
          (lambda ( )
              ;; Don't remap backspace. Leave it to autopair, please.
              (define-key python-mode-map [backspace] nil)
              (evil-define-key 'normal python-mode-map (kbd "s-r")
                (lambda() (interactive) (shell-command-on-region (point-min) (point-max) "python")))
              (evil-define-key 'visual python-mode-map (kbd "s-r")
                (lambda() (interactive) (shell-command-on-region (region-beginning) (region-end) "python")))

              ;; Let autopair work with triple-quotes
              (setq autopair-handle-action-fns
                    (list #'autopair-default-handle-action
                          #'autopair-python-triple-quote-action))))

;;
(provide 'env-python-mode)
{'fraction_non_alphanumeric': 0.16459884201819686, 'fraction_numerical': 0.0, 'mean_word_length': 2.6011904761904763, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1522435', 'n_tokens_mistral': 415, 'n_tokens_neox': 398, 'n_words': 76}