twisted / twistedchecker

twistedchecker is a tool to automatically verify code against the Twisted coding standard.
MIT License
9 stars 13 forks source link

twistedchecker fails on Python 3.6 #130

Open rodrigc opened 7 years ago

rodrigc commented 7 years ago

twistedchecker cannot run on Python 3.6 This must remain on Python 3.5. If you look at the logs: https://travis-ci.org/twisted/twisted/jobs/261731629 , this error is there:

AttributeError: 'TreeRebuilder3k' object has no attribute 'visit_joinedstr'

This is fixed upstream in newer versions of pylint and astroid: https://github.com/PyCQA/pylint/issues/1113

However, twistedchecker cannot use these new versions, because it monkey patches some internals of astroid. So we need to keep the twistedchecker stuff on Python 3.5 for now, until we can update twistedchecker to work with newer versions of astroid.

rodrigc commented 7 years ago

The modifiedBlankLines() function in twistedchecker https://github.com/twisted/twistedchecker/blob/master/twistedchecker/checkers/pycodestyleformat.py#L218 monkeypatches the blank_lines() function in pycodestyle: https://github.com/PyCQA/pycodestyle/blob/master/pycodestyle.py#L302

The problem is, the newer version of pycodesyle uses a function which takes 9 arguments, but twistedchecker's function takes 7 arguments.

So this patch no longer works.