[GeoNode-devel] flake8: problems detecting unused imports

Paolo Corti pcorti at gmail.com
Tue Mar 10 04:36:33 PDT 2015


Hi devs

today I am experiencing a weird problem with the flake8 and its
dependencies that come installed with GeoNode in a virtualenv. This
flake8 seems not to be able to recognize unused imports.

How to replicate:
$ virtualenv --no-site-packages env
$ . env/bin/activate
$ pip install -e .

now if I run flake8 the unused imports are not detected.

This is what I have:
$ flake8 --version
2.3.0 (pep8: 1.5.7) CPython 2.7.3 on Linux

Instead if I create a fresh virtualenv and I just install flake8 it
seems to work (note the output of flake8 --version, it is different
and seems containing references to pyflakes and mccabe):

$ virtualenv --no-site-packages env_flake8
$ . env_flake8/bin/activate
$ pip install flake8==2.3.0
$ flake8 --version
2.3.0 (pep8: 1.6.2, pyflakes: 0.8.1, mccabe: 0.3) CPython 2.7.3 on Linux
$ flake8 geonode
geonode/geoserver/tests.py:10:1: F401 'Client' imported but unused
geonode/tests/smoke.py:22:1: F401 'Client' imported but unused
geonode/documents/tests.py:10:1: F401 'Client' imported but unused
geonode/people/tests.py:21:1: F401 'Client' imported but unused
geonode/tests/integration.py:32:1: F401 'Client' imported but unused

any idea of what can be causing the failure?
thanks
p

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the geonode-devel mailing list