]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/Misc.py
BaseTools: dont make iterator into list if not needed
[mirror_edk2.git] / BaseTools / Source / Python / Common / Misc.py
index fe5a0b810166edcda6a798f1156408ba2ed7cea1..90350f86382674bd8e59b654d3dae1a880847687 100644 (file)
@@ -833,7 +833,7 @@ class TemplateString(object):
     def Append(self, AppendString, Dictionary=None):\r
         if Dictionary:\r
             SectionList = self._Parse(AppendString)\r
-            self.String += "".join([S.Instantiate(Dictionary) for S in SectionList])\r
+            self.String += "".join(S.Instantiate(Dictionary) for S in SectionList)\r
         else:\r
             self.String += AppendString\r
 \r
@@ -844,7 +844,7 @@ class TemplateString(object):
     #   @retval     str             The string replaced with placeholder values\r
     #\r
     def Replace(self, Dictionary=None):\r
-        return "".join([S.Instantiate(Dictionary) for S in self._TemplateSectionList])\r
+        return "".join(S.Instantiate(Dictionary) for S in self._TemplateSectionList)\r
 \r
 ## Progress indicator class\r
 #\r
@@ -1926,7 +1926,7 @@ class DefaultStore():
         if not self.DefaultStores or "0" in self.DefaultStores:\r
             return "0",TAB_DEFAULT_STORES_DEFAULT\r
         else:\r
-            minvalue = min([int(value_str) for value_str in self.DefaultStores])\r
+            minvalue = min(int(value_str) for value_str in self.DefaultStores)\r
             return (str(minvalue), self.DefaultStores[str(minvalue)])\r
     def GetMin(self,DefaultSIdList):\r
         if not DefaultSIdList:\r
@@ -2023,7 +2023,7 @@ class SkuClass():
             skuorderset.append(self.GetSkuChain(skuname))\r
         \r
         skuorder = []\r
-        for index in range(max([len(item) for item in skuorderset])):\r
+        for index in range(max(len(item) for item in skuorderset)):\r
             for subset in skuorderset:\r
                 if index > len(subset)-1:\r
                     continue\r