I am working on a django project and am trying to run pyflakes on an app in it. I need to exclude the "migrations" directory from pyflakes.
For pep8 I can do
pep8 --exclude=migrations app_name
Is there any similar way for pyflakes?
I couldn't find any proper documentation for pyflakes.
To exclude multiple directories, OR them between parentheses. And, to exclude directories with a specific name at any level, use the -name primary instead of -path .
We can exclude directories by using the help of “path“, “prune“, “o” and “print” switches with find command. The directory “bit” will be excluded from the find search!
without directories — and here it is. Adding -ls or -exec ls -l {} \; would make it like ls -l without directories. find .
If you exclude a file from a Web Site project (not Web Application), Visual Studio will simply add the . exclude extension to that file. If you remove the extension, that file will be included again. It's up to you if you still need those files or not.
Use flake8
tool instead - it is a wrapper around pyflakes
, pep8
and mccabe
.
Besides other features, it has an --exclude
option:
--exclude=patterns exclude files or directories which match these comma separated patterns (default: .svn,CVS,.bzr,.hg,.git,__pycache__)
Pyflakes supports a list of files or directories; no "exclude" option
Here's an equivalent:
pep8 `find app_name | egrep -v migrations`
pyflakes manpage: http://man.cx/?page=pyflakes&do%5Bgo%5D=go
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With