The pyflakes study project

85 views
Skip to first unread message

Edward K. Ream

unread,
May 25, 2016, 7:11:36 AM5/25/16
to leo-editor
I've been studying and modifying pyflakes for the last several days.

Pyflakes runs 60-100 times faster than pylint, and is almost as useful, so it's worth careful study.  Indeed, I think I've learned more from studying pyflakes than from studying any other program. Here are the present results:

git discussion group
github code repo

This code may form the basis of tool that will check that coding conventions match actual usage.  Pyflakes handles all of Leo's files in about 5 sec on my new machine, and my modified code does the same in 4 sec. I expect the convention checker will have similar performance.

I now understand the pyflakes code in detail, but I want to understand everything about how names are resolved to scopes.  A day or two more should wrap up this project, at which point I'll start fixing bugs again.

Edward

Edward K. Ream

unread,
Jun 4, 2016, 6:54:50 AM6/4/16
to leo-editor
On Wednesday, May 25, 2016 at 6:11:36 AM UTC-5, Edward K. Ream wrote:
I've been studying and modifying pyflakes for the last several days...

[google] discussion group
github code repo

 This project is now complete, as discussed here.

This code may form the basis of tool that will check that coding conventions match actual usage.

I started this project yesterday, with this git repo. This should be a smaller project.  May a day or so.  I'll start a google discussion group if there is something interesting to say.

EKR

Terry Brown

unread,
Jun 4, 2016, 4:36:45 PM6/4/16
to leo-e...@googlegroups.com
On Sat, 4 Jun 2016 03:54:49 -0700 (PDT)
"Edward K. Ream" <edre...@gmail.com> wrote:

> On Wednesday, May 25, 2016 at 6:11:36 AM UTC-5, Edward K. Ream wrote:
> >
> > I've been studying and modifying pyflakes for the last several
> > days...
> >
> > [google] discussion group
> > <https://groups.google.com/forum/#!forum/pyflakes-study>
> > github code repo <https://github.com/edreamleo/pyflakes-study>
>
> This project is now complete, as discussed here
> <https://groups.google.com/forum/#!topic/pyflakes-study/pJDC6A3zCHQ>.
>
> This code may form the basis of tool that will check that coding
> > conventions match actual usage.

Hi - you describe the repo. as a copy not a fork, but are you going
to / already did send a pull request to the main pyflakes repo. to
include the speed increases? They sounds significant.

Cheers -Terry

> I started this project yesterday, with this git repo
> <https://github.com/edreamleo/check_attrs>. This should be a smaller

Edward K. Ream

unread,
Jun 7, 2016, 10:26:09 AM6/7/16
to leo-editor
On Sat, Jun 4, 2016 at 3:36 PM, 'Terry Brown' via leo-editor
<leo-e...@googlegroups.com> wrote:

Hi - you describe the repo. as a copy not a fork, but are you going
to / already did send a pull request to the main pyflakes repo. to
include the speed increases?  They sounds significant.

​Thanks for the suggestion.  I've just subscribed to the pyflakes mailing list so that I can ask them what form they would like the pull request.

Edward

Edward K. Ream

unread,
Jun 9, 2016, 4:43:37 PM6/9/16
to leo-editor

Here is the latest exchange:

>> [Me] I would be happy to issue the pull request, but I'm not sure how to do that from one project (pyflakes_study) to another (pyflakes itself). Perhaps the pyflakes devs could investigate what I have done first.

> [Phil Frost] Consider the pull requested. I'm slammed with personal commitments right now, but I'll be sure to take a look in a couple weeks after things have settled down. From what I've read from your changes they sound really great. Thank you for taking the time to do this, and I promise your work won't go unnoticed.

So..., a great suggestion, Terry.

EKR
Reply all
Reply to author
Forward
0 new messages