I'd like to use twistedchecker when working on the Twisted project.

Twisted has somewhat unusual coding standards that aren't mutually compatible with PEP 8 (e.g. a mandatory three line gap between top-level definitions) so I would like the pylint checkers to be disabled and run only the twistedchecker and pyflakes checkers.

I've tried setting flycheck-python-pylint-executable to "twistedchecker" in my .dir-locals.el file, but that does not seem to change the output. (I have confirmed that it is set correctly).

I suspect that the answer is that I should write my own flycheck checker. There are plenty of examples of how to do this, so that should be OK. What I don't know is:

  • is there an easier way?
  • if not, how would I tell flycheck to use the twisted checker for files in ~/src/Twisted/?

I have also posted this question to the Twisted-Python mailing list.

1 Answer 1


Indeed, you must write your own python-twisted syntax checker [1]. There is no easier way—actually I think it's already pretty easy to write Flycheck checkers. You don't even need to look at extensions for examples: You can just look at the syntax checkers in Flycheck itself.

Flycheck provides flycheck-checker to explicitly select a specific syntax checker for a buffer. To use a specific syntax checker for all buffers in a project simply set flycheck-checker via directory variables. In other words, add src/Twisted/.dir-locals.el with the following contents:

  (flycheck-checker . python-twisted)))

[1] I wonder how you got the idea that changing the Pylint executable to an entirely unrelated program could possibly work…

  • twistedchecker is based heavily on pylint, and has similarly formatted output
    – jml
    Jun 12, 2015 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.