You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Some *nix distributions patch Flake8 arbitrarily to accommodate incompatible software versions. If you're on one of those distributions, your issue may be closed and you will be asked to open an issue with your distribution package maintainers instead.
Please provide the exact, unmodified output of flake8 --bug-report
The --filename=patterns filter does not apply to explicitly passed in paths.
Example:
$ echo 'abc def' > bad.txt
$ flake8 --filename='*.py' bad.txt # Note that `'*.py'` is the default value.
bad.txt:1:7: E999 SyntaxError: invalid syntax
The use case is to actually do flake8 $(git ls-files) in a repo that 1) contains autogenerated, non-git-tracked, non-style-checked Python files (in my case, generated by sphinx-gallery), and 2) contains a lot of non-Python files, which should be skipped. (Sure, I guess I could write flake8 $(git ls-files | grep '.*\.py$') but then what's the point of having --filename? :-))
Mildly related to #392, I guess, in terms of how filter flags interact with explicit file lists.
The text was updated successfully, but these errors were encountered:
I believe this is the intended behavior. Paths passed explicitly on the command line do not participate in inclusion / exclusion. A few other issues mentioning this behavior : #10#218 (there's also links to others there)
You might also find git ls-files -- '*.py' slightly less clunky (or to use --exclude and flake8 . )
In GitLab by @anntzer on Nov 8, 2018, 02:27
Please read this brief portion of documentation before going any further: http://flake8.pycqa.org/en/latest/internal/contributing.html#filing-a-bug
Please describe how you installed Flake8
Example:
in a venv.
Note: Some *nix distributions patch Flake8 arbitrarily to accommodate incompatible software versions. If you're on one of those distributions, your issue may be closed and you will be asked to open an issue with your distribution package maintainers instead.
Please provide the exact, unmodified output of
flake8 --bug-report
Please describe the problem or feature
The
--filename=patterns
filter does not apply to explicitly passed in paths.Example:
The use case is to actually do
flake8 $(git ls-files)
in a repo that 1) contains autogenerated, non-git-tracked, non-style-checked Python files (in my case, generated by sphinx-gallery), and 2) contains a lot of non-Python files, which should be skipped. (Sure, I guess I could writeflake8 $(git ls-files | grep '.*\.py$')
but then what's the point of having--filename
? :-))Mildly related to #392, I guess, in terms of how filter flags interact with explicit file lists.
The text was updated successfully, but these errors were encountered: