I'm struggling to get line length correctly setup under Elpy.
I found How to customize the line character length in elpy? and have in the past found flycheck cannot find module for pylint.
My configuration looks like (I've tried both
(add-hook 'python-mode-hook (lambda () (setq flycheck-python-pylint-executable "~/.virtualenvs/default/bin/pylint") (setq flycheck-pylintrc "~/.emacs.d/settings/.pylintrc"))) ;; enable autopep8 formatting on save (require 'py-autopep8) (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save) ;; (require 'py-yapf) ;; (add-hook 'python-mode-hook 'py-yapf-enable-on-save)
I have as per the suggestions in autopep8 · PyPI created
~/.config/pycodestyle which contains...
[pycodestyle] max_line_length = 120 ignore = E501
...and yet on saving a file it doesn't apply the 120 character rule in so much as lines that are > 120 characters are not auto-formatted and still reports in
line too long (124 > 79 characters) [E501] [2 times]
I've also set the following configuration option
(setq-default fill-column 120)
...which I'm unsure whether it will be interfering with things.
Any ideas or suggestions on how to configure autopep8 to automatically split lines at 120 characters would be very gratefully received as I feel like I've been going round in circles, despite seemingly trying the suggested solutions (I admit I may have misunderstood how to do this though or just cocked things up!).