Properly ignore flake8 F811 redefinition errors (#3932)

* Properly ignore flake8 F811 redefinition errors
* Add unit tests for flake8 command
* Allow spack flake8 to work on systems with older git
* Skip flake8 unit tests for Python 2.6 and 3.3
This commit is contained in:
Adam J. Stewart
2017-04-25 13:01:25 -05:00
committed by Todd Gamblin
parent 827ebe280d
commit 58f2a947db
8 changed files with 324 additions and 41 deletions

View File

@@ -251,7 +251,7 @@ def common_config_args(self):
# Don't disable all the database drivers, but should
# really get them into spack at some point.
@when('@3') # noqa: F811
@when('@3')
def configure(self):
# A user reported that this was necessary to link Qt3 on ubuntu.
# However, if LD_LIBRARY_PATH is not set the qt build fails, check
@@ -268,7 +268,7 @@ def configure(self):
'-release',
'-fast')
@when('@4') # noqa: F811
@when('@4')
def configure(self):
configure('-fast',
'-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
@@ -276,7 +276,7 @@ def configure(self):
'-arch', str(self.spec.architecture.target),
*self.common_config_args)
@when('@5.0:5.6') # noqa: F811
@when('@5.0:5.6')
def configure(self):
webkit_args = [] if '+webkit' in self.spec else ['-skip', 'qtwebkit']
configure('-no-eglfs',
@@ -284,7 +284,7 @@ def configure(self):
'-{0}gtkstyle'.format('' if '+gtk' in self.spec else 'no-'),
*(webkit_args + self.common_config_args))
@when('@5.7:') # noqa: F811
@when('@5.7:')
def configure(self):
config_args = self.common_config_args