Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Suggested default: check all py files in directory when passed a directory #2

Closed
reinout opened this issue Sep 15, 2009 · 10 comments
Closed

Comments

@reinout
Copy link
Contributor

reinout commented Sep 15, 2009

Pyflakes serves a similar function, but then for import checking. Core similarity is that it works on the raw python files: it doesn't need to import them. I commonly run it with "pyflakes ." or "pyflakes src/" and it goes off and checks everything.

I'd like the same thing with pep8: pass it a directory as first argument and it'll search all py files.

One thing to keep in mind: when passed nothing, pyflakes prints a usage message and pep8 listens to stdin instead. I propose leaving that for the moment, but it can be changed of course.

I'll do the work, but I wanted to get some feedback first :-)

@SmileyChris
Copy link
Contributor

I'm confused, isn't this what "pep8 src/" does already?

@reinout
Copy link
Contributor Author

reinout commented Sep 17, 2009

Partially. It does recursively check the directory, but it doesn't by default limit itself to *.py files. So it is actually that default that I'd like to add when passing in a directory.

@SmileyChris
Copy link
Contributor

Right. Then yes, I think that would be better :)

I'd say moving filename_match check out of input_file and into input_dir seems the right behaviour (and make the --filename option default to '*.py')

@SmileyChris
Copy link
Contributor

I've done this in my fork by the way

@reinout
Copy link
Contributor Author

reinout commented Sep 30, 2009

Great! Want me to do a 0.4 of it? Or are there other changes you've got in the pipeline?

Do you have pypi account, btw? Then I'll give you access too to prevent single points/persons of failure :-) I don't mind doing the releases (I've got script that handles the small tasks needed).

@SmileyChris
Copy link
Contributor

Sure, 0.4 it is. Sure, add me to the pypi package - I'm SmileyChris there too

@cburroughs
Copy link
Owner

I agree this is obviously better behavior. Leaving open until SmileyChris' changes are merged in.

@reinout
Copy link
Contributor Author

reinout commented Oct 5, 2009

Ok, give me a peep when finished (and which repository I'm supposed to be using :-) )

@cburroughs
Copy link
Owner

In with 9913903

@reinout
Copy link
Contributor Author

reinout commented Oct 20, 2009

Works like a charm. Included in the 0.4 release I just pushed out.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants