Directory Exclusion

I am working on a django project and am trying to run pyflakes in an application. I need to exclude the "migrations" directory from pyflakes.

For pep8 i can do

pep8 --exclude=migrations app_name 

Is there a similar way for pyroplexes?

I could not find suitable documentation for pyflakes.

+6
source share
2 answers

Pyflakes maintains a list of files or directories; no option to exclude

Here's the equivalent:

 pep8 `find app_name | egrep -v migrations` 

pyflakes manpage: http://man.cx/?page=pyflakes&do%5Bgo%5D=go

+1
source

Use the flake8 tool - this is a wrapper around pyflakes , pep8 and mccabe .

Among other functions, it has the --exclude option:

 --exclude=patterns exclude files or directories which match these comma separated patterns (default: .svn,CVS,.bzr,.hg,.git,__pycache__) 
+12
source

Source: https://habr.com/ru/post/971547/


All Articles