twisted / twisted-dev-tools

Tools for twisted development.
7 stars 8 forks source link

Create wrapper for pyflakes #10

Open adiroiban opened 9 years ago

adiroiban commented 9 years ago

We are slowly reaching a stage in which twisted code is clean of pyflakes errors.

Twisted still has the twisted/words/xish/xpathparser.py file which is autogenerated and should be ignored by pyflakes.

So we need a special pyflakes command for twisted which will ignore that file.

If we have that pyflakes command, I think that we can also add a --quick flag to is so that it will only check files which were changes since trunk. This is much faster than running pyflakes for all files and since a file was not changes in a branch, it should be safe to assume that it does not have pyflakes errors.

on my computer pyflakes twisted takes 10s ... I find it long and we can do better to reduce time wasted by developers :)

tomprince commented 9 years ago

Excluding a file seems like it might be something reasonable to suggest upstream? Or perhaps pyflakes could be included into twistedchecker, and that handle the configuration. (I know that flake8 does something similar.

adiroiban commented 9 years ago

I have reported a ticket upstream in launchpad and was asked to use flake8.

We might want to integrate pylakes into twistedchecker and add the exception there.


For my project I use pocket-lint https://launchpad.net/pocket-lint as a way to discover files and associated checkers based of file mime. The file is only loaded once in memory and then pass to various checkers . Reports are done using a common interface and in this way is easy to hook all checkers into the IDE/text editor.

So we might want to have something similar for twistedchecker... but I assume that most developers already have pyflakes integrated into their text editors anyway.

adiroiban commented 9 years ago

Here is the upstream ticket https://bugs.launchpad.net/pyflakes/+bug/1311129

update with good link

adiroiban commented 9 years ago

We should also run pyflakes and twistedchecker for the examples from the documentation so maybe this can be implemented as a top level twistedflakes which will automatically select what files to process