Skip to content

Commit

Permalink
Fix whitespace problems found with pep8.
Browse files Browse the repository at this point in the history
  • Loading branch information
bje- committed Dec 9, 2014
1 parent 1d6a327 commit 2c3b5bd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyevolve/G1DBinaryString.py
Expand Up @@ -53,7 +53,7 @@ class G1DBinaryString(G1DBase):
:param length: the 1D Binary String size
"""
__slots__ = [ "stringLength" ]
__slots__ = ["stringLength"]

def __init__(self, length=10):
""" The initializator of G1DList representation """
Expand Down
4 changes: 2 additions & 2 deletions pyevolve/G2DBinaryString.py
Expand Up @@ -58,12 +58,12 @@ class G2DBinaryString(GenomeBase):
:param width: the number of columns
"""
__slots__ = [ "height", "width", "genomeString" ]
__slots__ = ["height", "width", "genomeString"]

def __init__(self, height, width):
""" The initializator of G2DBinaryString representation,
height and width must be specified """
super(G2DBinaryString ,self).__init__()
super(G2DBinaryString, self).__init__()
self.height = height
self.width = width

Expand Down
2 changes: 1 addition & 1 deletion pyevolve/G2DList.py
Expand Up @@ -87,7 +87,7 @@ class G2DList(GenomeBase):
"""

__slots__ = [ "height", "width", "genomeList" ]
__slots__ = ["height", "width", "genomeList"]

def __init__(self, height, width, cloning=False):
""" The initializator of G2DList representation,
Expand Down
4 changes: 2 additions & 2 deletions pyevolve/GTree.py
Expand Up @@ -101,7 +101,7 @@ class GTreeNode(GTreeNodeBase):
:param parent: the parent node, if root, this
must be *None*
"""
__slots__ = [ "node_data" ]
__slots__ = ["node_data"]

def __init__(self, data, parent=None):
super(GTreeNode, self).__init__(parent)
Expand Down Expand Up @@ -239,7 +239,7 @@ class GTreeNodeGP(GTreeNodeBase):
:param parent: the node parent
"""
__slots__ = [ "node_type", "node_data" ]
__slots__ = ["node_type", "node_data"]

def __init__(self, data, node_type=0, parent=None):
super(GTreeNodeGP, self).__init__(parent)
Expand Down
12 changes: 6 additions & 6 deletions pyevolve/GenomeBase.py
Expand Up @@ -16,7 +16,7 @@

class GenomeBase(object):
""" GenomeBase Class - The base of all chromosome representation """
__slots__ = [ "evaluator", "initializator", "mutator", "crossover", "internalParams", "score", "fitness" ]
__slots__ = ["evaluator", "initializator", "mutator", "crossover", "internalParams", "score", "fitness"]

def __init__(self):
"""Genome Constructor"""
Expand Down Expand Up @@ -47,8 +47,8 @@ def getFitnessScore(self):

def __repr__(self):
"""String representation of Genome"""
allSlots = [ self.evaluator, self.initializator,
self.mutator, self.crossover ]
allSlots = [self.evaluator, self.initializator, self.mutator,
self.crossover]

ret = "- GenomeBase\n"
ret += "\tScore:\t\t\t %.6f\n" % (self.score,)
Expand Down Expand Up @@ -166,7 +166,7 @@ class G1DBase(GenomeBase):
.. versionadded:: 0.6
Added the *G1DBase* class
"""
__slots__ = [ "genomeSize", "genomeList" ]
__slots__ = ["genomeSize", "genomeList"]

def __init__(self, size):
super(G1DBase, self).__init__()
Expand Down Expand Up @@ -285,7 +285,7 @@ class GTreeNodeBase(object):
.. versionadded:: 0.6
Added the *GTreeNodeBase* class
"""
__slots__ = [ "parent", "childs" ]
__slots__ = ["parent", "childs"]

def __init__(self, parent, childs=None):
self.parent = parent
Expand Down Expand Up @@ -399,7 +399,7 @@ class GTreeBase(GenomeBase):
.. versionadded:: 0.6
Added the *GTreeBase* class
"""
__slots__ = [ "root_node", "tree_height", "nodes_list", "nodes_leaf", "nodes_branch" ]
__slots__ = ["root_node", "tree_height", "nodes_list", "nodes_leaf", "nodes_branch"]

def __init__(self, root_node):
super(GTreeBase, self).__init__()
Expand Down

0 comments on commit 2c3b5bd

Please sign in to comment.