@@ -34,7 +34,7 @@ def __init__(self, source="local", resource=None, domain="enterprise"):
3434 else :
3535 raise BadTemplateException
3636
37- def _build_raw (self , showName = True , showID = False , sort = 0 , scores = [] , subtechs = [] , exclude = [] ):
37+ def _build_raw (self , showName = True , showID = False , sort = 0 , scores = None , subtechs = None , exclude = None ):
3838 """Build a raw, not-yet-marked-up excel document based on the specifications.
3939
4040 :param showName: Whether or not to display names for each entry
@@ -44,6 +44,12 @@ def _build_raw(self, showName=True, showID=False, sort=0, scores=[], subtechs=[]
4444 :param exclude: List of of techniques to exclude from the matrix
4545 :return: a openpyxl workbook object containing the raw matrix
4646 """
47+ if scores is None :
48+ scores = []
49+ if subtechs is None :
50+ subtechs = []
51+ if exclude is None :
52+ exclude = []
4753 self .codex = self .h ._adjust_ordering (self .codex , sort , scores )
4854 template , joins = self .h ._construct_panop (self .codex , subtechs , exclude )
4955 self .template = template
@@ -107,7 +113,7 @@ def _build_raw(self, showName=True, showID=False, sort=0, scores=[], subtechs=[]
107113
108114 return wb
109115
110- def export (self , showName , showID , filters = None , sort = 0 , scores = [] , subtechs = [] , exclude = [] ):
116+ def export (self , showName , showID , filters = None , sort = 0 , scores = None , subtechs = None , exclude = None ):
111117 """Export a raw customized excel template.
112118
113119 :param showName: Whether or not to display names for each entry
@@ -119,6 +125,12 @@ def export(self, showName, showID, filters=None, sort=0, scores=[], subtechs=[],
119125 :param exclude: List of of techniques to exclude from the matrix
120126 return: a openpyxl workbook object containing the raw matrix
121127 """
128+ if scores is None :
129+ scores = []
130+ if subtechs is None :
131+ subtechs = []
132+ if exclude is None :
133+ exclude = []
122134 self .codex = self .h .get_matrix (self .mode , filters = filters )
123135 return self ._build_raw (showName , showID , sort , scores , subtechs , exclude )
124136
0 commit comments