Spack packages now PEP8 compliant.
This commit is contained in:
		@@ -22,12 +22,10 @@
 | 
			
		||||
# License along with this program; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
			
		||||
##############################################################################
 | 
			
		||||
import imp
 | 
			
		||||
from llnl.util.filesystem import join_path
 | 
			
		||||
from spack.util.naming import mod_to_class
 | 
			
		||||
from spack import *
 | 
			
		||||
import spack.architecture
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Multimethod(Package):
 | 
			
		||||
    """This package is designed for use with Spack's multimethod test.
 | 
			
		||||
       It has a bunch of test cases for the @when decorator that the
 | 
			
		||||
@@ -52,7 +50,6 @@ def no_version_2(self):
 | 
			
		||||
    def no_version_2(self):
 | 
			
		||||
        return 4
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    # These functions overlap, so there is ambiguity, but we'll take
 | 
			
		||||
    # the first one.
 | 
			
		||||
@@ -65,7 +62,6 @@ def version_overlap(self):
 | 
			
		||||
    def version_overlap(self):
 | 
			
		||||
        return 2
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    # More complicated case with cascading versions.
 | 
			
		||||
    #
 | 
			
		||||
@@ -84,7 +80,6 @@ def mpi_version(self):
 | 
			
		||||
    def mpi_version(self):
 | 
			
		||||
        return 1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    # Use these to test whether the default method is called when no
 | 
			
		||||
    # match is found.  This also tests whether we can switch methods
 | 
			
		||||
@@ -101,8 +96,6 @@ def has_a_default(self):
 | 
			
		||||
    def has_a_default(self):
 | 
			
		||||
        return 'intel'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    # Make sure we can switch methods on different target
 | 
			
		||||
    #
 | 
			
		||||
@@ -112,15 +105,16 @@ def has_a_default(self):
 | 
			
		||||
        targets = targets[:-1]
 | 
			
		||||
 | 
			
		||||
    for target in targets:
 | 
			
		||||
        @when('target='+target.name)
 | 
			
		||||
        @when('target=' + target.name)
 | 
			
		||||
        def different_by_target(self):
 | 
			
		||||
            if isinstance(self.spec.architecture.target,basestring):
 | 
			
		||||
            if isinstance(self.spec.architecture.target, basestring):
 | 
			
		||||
                return self.spec.architecture.target
 | 
			
		||||
            else:
 | 
			
		||||
                return self.spec.architecture.target.name
 | 
			
		||||
    #
 | 
			
		||||
    # Make sure we can switch methods on different dependencies
 | 
			
		||||
    #
 | 
			
		||||
 | 
			
		||||
    @when('^mpich')
 | 
			
		||||
    def different_by_dep(self):
 | 
			
		||||
        return 'mpich'
 | 
			
		||||
@@ -129,7 +123,6 @@ def different_by_dep(self):
 | 
			
		||||
    def different_by_dep(self):
 | 
			
		||||
        return 'zmpi'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    #
 | 
			
		||||
    # Make sure we can switch on virtual dependencies
 | 
			
		||||
    #
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user