Open tedmiston opened 8 years ago
I think I originally meant for --exclude
to be used with --recursive
only. But I see how this might be unintuitive. In any case, pep8
/pycodestyle
does things the way you and the Stack Overflow question expects. So I think it would make sense to fix this. At the very least, this would make our tools match in behavior.
Thanks
Thanks so much for the clarification. Admittedly an edge case, but I appreciate taking the time to address it. Thank you!
I fall into this case also. Just for the record, to launch the tool only against .py files I execute the tool two times in this way:
autopep8 --diff --recursive **/*.py
autopep8 --diff --recursive *.py
In trying to help answer someone's question on Stack Overflow, I came across what may be a bug, or perhaps just something that's unclear to me.
The full details are here on SO, but I've copied below for your convenience.
Also here are the details requested in the contributor guidelines:
To create this setup, I simply ran
mktmpenv
followed bypip install autopep8
.This style to avoid specific files works for me (using either single or double quotes):
This also works:
However this does not exclude .styl files:
In my opinion, it appears [OP has] identified a bug in autopep8.
However, perhaps it's not a bug, but rather an opinionated decision that star inclusion should take precedence over star exclusion.
In other words, is running this command intended to process (a) all files, or (b) no files?