summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
231fdbb)
remove self, and add @staticmethod to functions
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
#\r
# Check whether reloc strip flag can be set for a file type.\r
#\r
#\r
# Check whether reloc strip flag can be set for a file type.\r
#\r
- # @param self The object pointer\r
# @param FileType The file type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
# @param FileType The file type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
- \r
- def __FileCouldHaveRelocFlag (self, FileType):\r
+ @staticmethod\r
+ def __FileCouldHaveRelocFlag (FileType):\r
if FileType in ('SEC', 'PEI_CORE', 'PEIM', 'PEI_DXE_COMBO'):\r
return True\r
else:\r
if FileType in ('SEC', 'PEI_CORE', 'PEIM', 'PEI_DXE_COMBO'):\r
return True\r
else:\r
#\r
# Check whether reloc strip flag can be set for a section type.\r
#\r
#\r
# Check whether reloc strip flag can be set for a section type.\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
# @param SectionType The section type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
- \r
- def __SectionCouldHaveRelocFlag (self, SectionType):\r
+ @staticmethod\r
+ def __SectionCouldHaveRelocFlag (SectionType):\r
if SectionType in ('TE', 'PE32'):\r
return True\r
else:\r
if SectionType in ('TE', 'PE32'):\r
return True\r
else:\r
#\r
# Get whether a section could be optional\r
#\r
#\r
# Get whether a section could be optional\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could be optional\r
# @retval False section never optional\r
#\r
# @param SectionType The section type to check\r
# @retval True section could be optional\r
# @retval False section never optional\r
#\r
- def __RuleSectionCouldBeOptional(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldBeOptional(SectionType):\r
if SectionType in ("DXE_DEPEX", "UI", "VERSION", "PEI_DEPEX", "RAW", "SMM_DEPEX"):\r
return True\r
else:\r
if SectionType in ("DXE_DEPEX", "UI", "VERSION", "PEI_DEPEX", "RAW", "SMM_DEPEX"):\r
return True\r
else:\r
#\r
# Get whether a section could have build number information\r
#\r
#\r
# Get whether a section could have build number information\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could have build number information\r
# @retval False section never have build number information\r
#\r
# @param SectionType The section type to check\r
# @retval True section could have build number information\r
# @retval False section never have build number information\r
#\r
- def __RuleSectionCouldHaveBuildNum(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldHaveBuildNum(SectionType):\r
if SectionType in ("VERSION"):\r
return True\r
else:\r
if SectionType in ("VERSION"):\r
return True\r
else:\r
#\r
# Get whether a section could have string\r
#\r
#\r
# Get whether a section could have string\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could have string\r
# @retval False section never have string\r
#\r
# @param SectionType The section type to check\r
# @retval True section could have string\r
# @retval False section never have string\r
#\r
- def __RuleSectionCouldHaveString(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldHaveString(SectionType):\r
if SectionType in ("UI", "VERSION"):\r
return True\r
else:\r
if SectionType in ("UI", "VERSION"):\r
return True\r
else:\r
# Preprocess done.\r
self.Rewind()\r
\r
# Preprocess done.\r
self.Rewind()\r
\r
- def __GetIfListCurrentItemStat(self, IfList):\r
+ @staticmethod\r
+ def __GetIfListCurrentItemStat(IfList):\r
if len(IfList) == 0:\r
return True\r
\r
if len(IfList) == 0:\r
return True\r
\r
#\r
# Check whether reloc strip flag can be set for a file type.\r
#\r
#\r
# Check whether reloc strip flag can be set for a file type.\r
#\r
- # @param self The object pointer\r
# @param FileType The file type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
# @param FileType The file type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
-\r
- def __FileCouldHaveRelocFlag (self, FileType):\r
+ @staticmethod\r
+ def __FileCouldHaveRelocFlag (FileType):\r
if FileType in ('SEC', 'PEI_CORE', 'PEIM', 'PEI_DXE_COMBO'):\r
return True\r
else:\r
if FileType in ('SEC', 'PEI_CORE', 'PEIM', 'PEI_DXE_COMBO'):\r
return True\r
else:\r
#\r
# Check whether reloc strip flag can be set for a section type.\r
#\r
#\r
# Check whether reloc strip flag can be set for a section type.\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
# @param SectionType The section type to check with\r
# @retval True This type could have relocation strip flag\r
# @retval False No way to have it\r
#\r
-\r
- def __SectionCouldHaveRelocFlag (self, SectionType):\r
+ @staticmethod\r
+ def __SectionCouldHaveRelocFlag (SectionType):\r
if SectionType in ('TE', 'PE32'):\r
return True\r
else:\r
if SectionType in ('TE', 'PE32'):\r
return True\r
else:\r
#\r
# Get whether a section could be optional\r
#\r
#\r
# Get whether a section could be optional\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could be optional\r
# @retval False section never optional\r
#\r
# @param SectionType The section type to check\r
# @retval True section could be optional\r
# @retval False section never optional\r
#\r
- def __RuleSectionCouldBeOptional(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldBeOptional(SectionType):\r
if SectionType in ("DXE_DEPEX", "UI", "VERSION", "PEI_DEPEX", "RAW", "SMM_DEPEX"):\r
return True\r
else:\r
if SectionType in ("DXE_DEPEX", "UI", "VERSION", "PEI_DEPEX", "RAW", "SMM_DEPEX"):\r
return True\r
else:\r
#\r
# Get whether a section could have build number information\r
#\r
#\r
# Get whether a section could have build number information\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could have build number information\r
# @retval False section never have build number information\r
#\r
# @param SectionType The section type to check\r
# @retval True section could have build number information\r
# @retval False section never have build number information\r
#\r
- def __RuleSectionCouldHaveBuildNum(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldHaveBuildNum(SectionType):\r
if SectionType in ("VERSION"):\r
return True\r
else:\r
if SectionType in ("VERSION"):\r
return True\r
else:\r
#\r
# Get whether a section could have string\r
#\r
#\r
# Get whether a section could have string\r
#\r
- # @param self The object pointer\r
# @param SectionType The section type to check\r
# @retval True section could have string\r
# @retval False section never have string\r
#\r
# @param SectionType The section type to check\r
# @retval True section could have string\r
# @retval False section never have string\r
#\r
- def __RuleSectionCouldHaveString(self, SectionType):\r
+ @staticmethod\r
+ def __RuleSectionCouldHaveString(SectionType):\r
if SectionType in ("UI", "VERSION"):\r
return True\r
else:\r
if SectionType in ("UI", "VERSION"):\r
return True\r
else:\r