Replace your relevant configuration with this:
(add-hook 'python-mode-hook (lambda ()
(setq flycheck-checker 'python-pylint
The specific error you mention was being caused because your file has a lot of errors, and by default the variable
flycheck-checker-error-threshold is set to
400 (while your file seems to contain
By setting this really high, you will avoid this error, but I assume you will get a very slow buffer. With files like this it might be better to not use
flycheck and instead use something that doesn't do its checking in real time (I use the line
(setq python-check-command "flake8") in my configuration and syntax is checked each time the file is saved. I don't use
(setq python-check-command "pylint") should work too, as long as you have
pylint installed, and should use the same
.pylintrc (in fact, you can try the example above without setting
flycheck-pylintrc, because I think emacs will look for this file in your home folder by default).
This configuration snippet will also enable
flycheck-mode by default so remove the line
(flycheck-mode 1) if you don't want this. At any rate, you can run
M-x flycheck-mode to toggle this mode on and off.
Finally, when you are using
add-hook make sure the next argument is a mode hook, not the mode itself (e.g.,
'python-mode) Happy configuring!
Also, note that I have removed the
' before the
lambda from the OP's original configuration snippet. As pointed out in the comments by @lunaryorn,
lambda's are "self-quoting" and so the quote is at best redundant, and at worst...well, I will direct you to these posts that seem useful on the subject (I will be reading up on this topic myself):
Also, if you were using the snippet pre-edit (i.e., with the quote), have no fear: it will still work as expected without it.