From fb0b35e05f772bd415fe264267bbbcde2e0accda Mon Sep 17 00:00:00 2001 From: Antoine Coeur Date: Wed, 6 Feb 2019 15:44:39 +0800 Subject: BaseTools: Various typo Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur Reviewed-by: Liming Gao --- BaseTools/Source/Python/UPT/Core/DependencyRules.py | 2 +- BaseTools/Source/Python/UPT/Core/IpiDb.py | 16 ++++++++-------- .../Source/Python/UPT/GenMetaFile/GenDecFile.py | 4 ++-- .../Source/Python/UPT/GenMetaFile/GenInfFile.py | 4 ++-- BaseTools/Source/Python/UPT/InstallPkg.py | 20 ++++++++++---------- .../Source/Python/UPT/Library/CommentParsing.py | 14 +++++++------- BaseTools/Source/Python/UPT/Library/DataType.py | 2 +- BaseTools/Source/Python/UPT/Library/GlobalData.py | 2 +- BaseTools/Source/Python/UPT/Library/Misc.py | 8 ++++---- .../Source/Python/UPT/Library/ParserValidate.py | 14 +++++++------- BaseTools/Source/Python/UPT/Library/Parsing.py | 2 +- BaseTools/Source/Python/UPT/Library/StringUtils.py | 12 ++++++------ .../Source/Python/UPT/Library/UniClassObject.py | 20 ++++++++++---------- BaseTools/Source/Python/UPT/Logger/Log.py | 6 +++--- BaseTools/Source/Python/UPT/Logger/StringTable.py | 12 ++++++------ BaseTools/Source/Python/UPT/Logger/ToolError.py | 2 +- BaseTools/Source/Python/UPT/MkPkg.py | 2 +- .../Source/Python/UPT/Object/Parser/DecObject.py | 4 ++-- BaseTools/Source/Python/UPT/Parser/DecParser.py | 4 ++-- .../Source/Python/UPT/Parser/InfAsBuiltProcess.py | 4 ++-- .../Source/Python/UPT/PomAdapter/DecPomAlignment.py | 4 ++-- .../Source/Python/UPT/PomAdapter/InfPomAlignment.py | 2 +- .../Python/UPT/PomAdapter/InfPomAlignmentMisc.py | 4 ++-- BaseTools/Source/Python/UPT/RmPkg.py | 4 ++-- .../Source/Python/UPT/UnitTest/DecParserUnitTest.py | 6 +++--- 25 files changed, 87 insertions(+), 87 deletions(-) (limited to 'BaseTools/Source/Python/UPT') diff --git a/BaseTools/Source/Python/UPT/Core/DependencyRules.py b/BaseTools/Source/Python/UPT/Core/DependencyRules.py index 9c3baa1b12..89b81f8b1f 100644 --- a/BaseTools/Source/Python/UPT/Core/DependencyRules.py +++ b/BaseTools/Source/Python/UPT/Core/DependencyRules.py @@ -159,7 +159,7 @@ class DependencyRules(object): # # @param PkgObj: A package object # @param DpObj: A distribution object - # @return: True if package depex satisified + # @return: True if package depex satisfied # False else # def CheckPackageDepexSatisfied(self, PkgObj, DpObj=None): diff --git a/BaseTools/Source/Python/UPT/Core/IpiDb.py b/BaseTools/Source/Python/UPT/Core/IpiDb.py index 48defeac7e..bedf26321e 100644 --- a/BaseTools/Source/Python/UPT/Core/IpiDb.py +++ b/BaseTools/Source/Python/UPT/Core/IpiDb.py @@ -735,8 +735,8 @@ class IpiDatabase(object): ## Get a list of module information that comes from DP. # - # @param DpGuid: A Distrabution Guid - # @param DpVersion: A Distrabution version + # @param DpGuid: A Distribution Guid + # @param DpVersion: A Distribution version # def GetSModInsPathListFromDp(self, DpGuid, DpVersion): @@ -754,8 +754,8 @@ class IpiDatabase(object): ## Get a list of package information. # - # @param DpGuid: A Distrabution Guid - # @param DpVersion: A Distrabution version + # @param DpGuid: A Distribution Guid + # @param DpVersion: A Distribution version # def GetPackageListFromDp(self, DpGuid, DpVersion): @@ -774,8 +774,8 @@ class IpiDatabase(object): ## Get a list of modules that depends on package information from a DP. # - # @param DpGuid: A Distrabution Guid - # @param DpVersion: A Distrabution version + # @param DpGuid: A Distribution Guid + # @param DpVersion: A Distribution version # def GetDpDependentModuleList(self, DpGuid, DpVersion): @@ -831,8 +831,8 @@ class IpiDatabase(object): ## Get Dp's list of modules. # - # @param DpGuid: A Distrabution Guid - # @param DpVersion: A Distrabution version + # @param DpGuid: A Distribution Guid + # @param DpVersion: A Distribution version # def GetDpModuleList(self, DpGuid, DpVersion): ModList = [] diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py index e2dd6a02dc..63c6da0fec 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py @@ -646,8 +646,8 @@ def GenPackageUNIEncodeFile(PackageObject, UniFileHeader = '', Encoding=TAB_ENCO File = codecs.open(ContainerFile, 'w', Encoding) File.write(u'\uFEFF' + Content) File.stream.close() - Md5Sigature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() if (ContainerFile, Md5Sum) not in PackageObject.FileList: PackageObject.FileList.append((ContainerFile, Md5Sum)) diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py index 1f8b3f163e..40346b0b3a 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py @@ -255,8 +255,8 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD File = codecs.open(ContainerFile, 'wb', Encoding) File.write(u'\uFEFF' + Content) File.stream.close() - Md5Sigature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(ContainerFile), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() if (ContainerFile, Md5Sum) not in ModuleObject.FileList: ModuleObject.FileList.append((ContainerFile, Md5Sum)) diff --git a/BaseTools/Source/Python/UPT/InstallPkg.py b/BaseTools/Source/Python/UPT/InstallPkg.py index c553d707fd..cbc54f9407 100644 --- a/BaseTools/Source/Python/UPT/InstallPkg.py +++ b/BaseTools/Source/Python/UPT/InstallPkg.py @@ -176,8 +176,8 @@ def UnZipDp(WorkspaceDir, DpPkgFileName, Index=1): # verify MD5 signature when existed # if DistPkg.Header.Signature != '': - Md5Sigature = md5(__FileHookOpen__(ContentFile, 'rb').read()) - if DistPkg.Header.Signature != Md5Sigature.hexdigest(): + Md5Signature = md5(__FileHookOpen__(ContentFile, 'rb').read()) + if DistPkg.Header.Signature != Md5Signature.hexdigest(): ContentZipFile.Close() Logger.Error("InstallPkg", FILE_CHECKSUM_FAILURE, ExtraData=ContentFile) @@ -215,8 +215,8 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi # for Package in PackageList: FilePath = PackageToDec(Package, DistPkg.Header) - Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() if (FilePath, Md5Sum) not in Package.FileList: Package.FileList.append((FilePath, Md5Sum)) @@ -275,8 +275,8 @@ def GetModuleList(DistPkg, Dep, WorkspaceDir, ContentZipFile, ModuleList): for (Module, Package) in ModuleList: CheckCNameInModuleRedefined(Module, DistPkg) FilePath = ModuleToInf(Module, Package, DistPkg.Header) - Md5Sigature = md5(__FileHookOpen__(str(FilePath), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(FilePath), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() if Package: if (FilePath, Md5Sum) not in Package.FileList: Package.FileList.append((FilePath, Md5Sum)) @@ -803,8 +803,8 @@ def InstallFile(ContentZipFile, FromFile, ToFile, ReadOnly, Executable=False): else: chmod(ToFile, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH) - Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() return Md5Sum @@ -876,8 +876,8 @@ def InstallPackageContent(FromPath, ToPath, Package, ContentZipFile, Dep, chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH) else: chmod(ToFile, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR|stat.S_IWGRP|stat.S_IWOTH) - Md5Sigature = md5(__FileHookOpen__(str(ToFile), 'rb').read()) - Md5Sum = Md5Sigature.hexdigest() + Md5Signature = md5(__FileHookOpen__(str(ToFile), 'rb').read()) + Md5Sum = Md5Signature.hexdigest() if (ToFile, Md5Sum) not in Package.FileList: Package.FileList.append((ToFile, Md5Sum)) Package.SetIncludeArchList(PackageIncludeArchList) diff --git a/BaseTools/Source/Python/UPT/Library/CommentParsing.py b/BaseTools/Source/Python/UPT/Library/CommentParsing.py index a09a530ffb..250ba2dd5e 100644 --- a/BaseTools/Source/Python/UPT/Library/CommentParsing.py +++ b/BaseTools/Source/Python/UPT/Library/CommentParsing.py @@ -426,7 +426,7 @@ def _CheckListExpression(Expression): return IsValidListExpr(ListExpr) -## _CheckExpreesion +## _CheckExpression # # @param Expression: Pcd value expression # @@ -476,11 +476,11 @@ def _ValidateCopyright(Line): def GenerateTokenList (Comment): # - # Tokenize Comment using '#' and ' ' as token seperators + # Tokenize Comment using '#' and ' ' as token separators # - RelplacedComment = None - while Comment != RelplacedComment: - RelplacedComment = Comment + ReplacedComment = None + while Comment != ReplacedComment: + ReplacedComment = Comment Comment = Comment.replace('##', '#').replace(' ', ' ').replace(' ', '#').strip('# ') return Comment.split('#') @@ -538,13 +538,13 @@ def ParseComment (Comment, UsageTokens, TypeTokens, RemoveTokens, ParseVariable) NumTokens = 1 # - # Initialze HelpText to Comment. + # Initialize HelpText to Comment. # Content will be remove from HelpText as matching tokens are found # HelpText = Comment # - # Tokenize Comment using '#' and ' ' as token seperators + # Tokenize Comment using '#' and ' ' as token separators # List = GenerateTokenList (Comment) diff --git a/BaseTools/Source/Python/UPT/Library/DataType.py b/BaseTools/Source/Python/UPT/Library/DataType.py index 97ca835882..07673694b2 100644 --- a/BaseTools/Source/Python/UPT/Library/DataType.py +++ b/BaseTools/Source/Python/UPT/Library/DataType.py @@ -93,7 +93,7 @@ TAB_STR_TOKENHELP = 'HELP' TAB_STR_TOKENERR = 'ERR' # -# Dictionary of usage tokens and their synonmys +# Dictionary of usage tokens and their synonyms # ALL_USAGE_TOKENS = { "PRODUCES" : "PRODUCES", diff --git a/BaseTools/Source/Python/UPT/Library/GlobalData.py b/BaseTools/Source/Python/UPT/Library/GlobalData.py index 40b17cf083..6b093873dd 100644 --- a/BaseTools/Source/Python/UPT/Library/GlobalData.py +++ b/BaseTools/Source/Python/UPT/Library/GlobalData.py @@ -43,7 +43,7 @@ gINVALID_MODULE_FILE = gUPT_DIR + r"Invalid_Modules.log" gCONTENT_FILE = "dist.content" # -# File name for XML file in the distibution +# File name for XML file in the distribution # gDESC_FILE = 'dist.pkg' diff --git a/BaseTools/Source/Python/UPT/Library/Misc.py b/BaseTools/Source/Python/UPT/Library/Misc.py index d69b161420..e7ee27cc53 100644 --- a/BaseTools/Source/Python/UPT/Library/Misc.py +++ b/BaseTools/Source/Python/UPT/Library/Misc.py @@ -788,7 +788,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo): FileGuidString = "" VerString = "" - OrignalString = String + OriginalString = String String = String.strip() if not String: return None, None @@ -808,7 +808,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo): ST.ERR_FILELIST_EXIST % (String), File=GlobalData.gINF_MODULE_NAME, Line=LineNo, - ExtraData=OrignalString) + ExtraData=OriginalString) # # Validate file exist/format. @@ -821,7 +821,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo): ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID % (String), File=GlobalData.gINF_MODULE_NAME, Line=LineNo, - ExtraData=OrignalString) + ExtraData=OriginalString) return False if IsValidFileFlag: FileLinesList = [] @@ -973,7 +973,7 @@ def ValidateUNIFilePath(Path): ExtraData=Path) # - # Check if '..' in the file name(without suffixe) + # Check if '..' in the file name(without suffix) # if (TAB_SPLIT + TAB_SPLIT) in Path: Logger.Error("Unicode File Parser", diff --git a/BaseTools/Source/Python/UPT/Library/ParserValidate.py b/BaseTools/Source/Python/UPT/Library/ParserValidate.py index 87d156fa4c..1408aec242 100644 --- a/BaseTools/Source/Python/UPT/Library/ParserValidate.py +++ b/BaseTools/Source/Python/UPT/Library/ParserValidate.py @@ -13,7 +13,7 @@ # ''' -PaserValidate +ParserValidate ''' import os.path @@ -68,7 +68,7 @@ def IsValidHex(HexStr): # def IsValidBoolType(BoolString): # - # Valid Ture + # Valid True # if BoolString == 'TRUE' or \ BoolString == 'True' or \ @@ -124,11 +124,11 @@ def IsValidInfComponentType(ComponentType): ## Is valid Tool Family or not # # @param ToolFamily: A string contain Tool Family need to be judged. -# Famlily := [A-Z]([a-zA-Z0-9])* +# Family := [A-Z]([a-zA-Z0-9])* # def IsValidToolFamily(ToolFamily): - ReIsValieFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL) - if ReIsValieFamily.match(ToolFamily) is None: + ReIsValidFamily = re.compile(r"^[A-Z]+[A-Za-z0-9]{0,}$", re.DOTALL) + if ReIsValidFamily.match(ToolFamily) is None: return False return True @@ -158,8 +158,8 @@ def IsValidToolTagName(TagName): def IsValidArch(Arch): if Arch == 'common': return True - ReIsValieArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL) - if ReIsValieArch.match(Arch) is None: + ReIsValidArch = re.compile(r"^[a-zA-Z]+[a-zA-Z0-9]{0,}$", re.DOTALL) + if ReIsValidArch.match(Arch) is None: return False return True diff --git a/BaseTools/Source/Python/UPT/Library/Parsing.py b/BaseTools/Source/Python/UPT/Library/Parsing.py index 3eca8e3849..f7e995b93e 100644 --- a/BaseTools/Source/Python/UPT/Library/Parsing.py +++ b/BaseTools/Source/Python/UPT/Library/Parsing.py @@ -959,7 +959,7 @@ def MacroParser(Line, FileName, SectionType, FileLocalMacros): # INF, DEC specs # @param SectionDict: section statement dict, key is SectionAttrs(arch, # moduletype or platform may exist as needed) list -# seperated by space, +# separated by space, # value is statement # def GenSection(SectionName, SectionDict, SplitArch=True, NeedBlankLine=False): diff --git a/BaseTools/Source/Python/UPT/Library/StringUtils.py b/BaseTools/Source/Python/UPT/Library/StringUtils.py index a3391daa91..6fa1ee89d4 100644 --- a/BaseTools/Source/Python/UPT/Library/StringUtils.py +++ b/BaseTools/Source/Python/UPT/Library/StringUtils.py @@ -33,7 +33,7 @@ gMACRO_PATTERN = re.compile("\$\(([_A-Z][_A-Z0-9]*)\)", re.UNICODE) ## GetSplitValueList # -# Get a value list from a string with multiple values splited with SplitTag +# Get a value list from a string with multiple values split with SplitTag # The default SplitTag is DataType.TAB_VALUE_SPLIT # 'AAA|BBB|CCC' -> ['AAA', 'BBB', 'CCC'] # @@ -67,7 +67,7 @@ def MergeArches(Dict, Key, Arch): # Return False if invalid format # # @param String: String with DEFINE statement -# @param Arch: Supportted Arch +# @param Arch: Supported Arch # @param Defines: DEFINE statement to be parsed # def GenDefines(String, Arch, Defines): @@ -236,7 +236,7 @@ def ReplaceMacro(String, MacroDefinitions=None, SelfReplacement=False, Line=None ## NormPath # # Create a normal path -# And replace DFEINE in the path +# And replace DEFINE in the path # # @param Path: The input value for Path to be converted # @param Defines: A set for DEFINE statement @@ -613,9 +613,9 @@ def WorkspaceFile(WorkspaceDir, Filename): ## Split string # -# Revmove '"' which startswith and endswith string +# Remove '"' which startswith and endswith string # -# @param String: The string need to be splited +# @param String: The string need to be split # def SplitString(String): if String.startswith('\"'): @@ -734,7 +734,7 @@ def IsHexDigit(Str): return False return False -## Check if the string is HexDgit and its interger value within limit of UINT32 +## Check if the string is HexDgit and its integer value within limit of UINT32 # # Return true if all characters in the string are digits and there is at # least one character diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py index bd7804b753..d575c6b1f8 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -130,12 +130,12 @@ def ConvertSpecialUnicodes(Uni): ## GetLanguageCode1766 # # Check the language code read from .UNI file and convert RFC 4646 codes to RFC 1766 codes -# RFC 1766 language codes supported in compatiblity mode +# RFC 1766 language codes supported in compatibility mode # RFC 4646 language codes supported in native mode # # @param LangName: Language codes read from .UNI file # -# @retval LangName: Valid lanugage code in RFC 1766 format or None +# @retval LangName: Valid language code in RFC 1766 format or None # def GetLanguageCode1766(LangName, File=None): return LangName @@ -177,7 +177,7 @@ def GetLanguageCode1766(LangName, File=None): ## GetLanguageCode # # Check the language code read from .UNI file and convert RFC 1766 codes to RFC 4646 codes if appropriate -# RFC 1766 language codes supported in compatiblity mode +# RFC 1766 language codes supported in compatibility mode # RFC 4646 language codes supported in native mode # # @param LangName: Language codes read from .UNI file @@ -221,13 +221,13 @@ def GetLanguageCode(LangName, IsCompatibleMode, File): ## FormatUniEntry # -# Formated the entry in Uni file. +# Formatted the entry in Uni file. # # @param StrTokenName StrTokenName. # @param TokenValueList A list need to be processed. # @param ContainerFile ContainerFile. # -# @return formated entry +# @return formatted entry def FormatUniEntry(StrTokenName, TokenValueList, ContainerFile): SubContent = '' PreFormatLength = 40 @@ -478,8 +478,8 @@ class UniFileClassObject(object): MultiLineFeedExits = False # # 0: initial value - # 1: signle String entry exist - # 2: line feed exist under the some signle String entry + # 1: single String entry exist + # 2: line feed exist under the some single String entry # StringEntryExistsFlag = 0 for Line in FileIn: @@ -497,7 +497,7 @@ class UniFileClassObject(object): StringEntryExistsFlag = 2 # # If the '#string' line and the '#language' line are not in the same line, - # there should be only one line feed character betwwen them + # there should be only one line feed character between them # if MultiLineFeedExits: EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path) @@ -505,7 +505,7 @@ class UniFileClassObject(object): MultiLineFeedExits = False # - # Process comment embeded in string define lines + # Process comment embedded in string define lines # FindFlag = Line.find(u'//') if FindFlag != -1 and Line.find(u'//') < Line.find(u'"'): @@ -771,7 +771,7 @@ class UniFileClassObject(object): # # Check Abstract, Description, BinaryAbstract and BinaryDescription order, - # should be Abstract, Description, BinaryAbstract, BinaryDesctiption + # should be Abstract, Description, BinaryAbstract, BinaryDescription AbstractPosition = -1 DescriptionPosition = -1 BinaryAbstractPosition = -1 diff --git a/BaseTools/Source/Python/UPT/Logger/Log.py b/BaseTools/Source/Python/UPT/Logger/Log.py index e8c31f0072..7671202b30 100644 --- a/BaseTools/Source/Python/UPT/Logger/Log.py +++ b/BaseTools/Source/Python/UPT/Logger/Log.py @@ -190,7 +190,7 @@ def Warn(ToolName, Message, File=None, Line=None, ExtraData=None): _INFO_LOGGER.log(WARN, LogText) # - # Raise an execption if indicated + # Raise an exception if indicated # if GlobalData.gWARNING_AS_ERROR == True: raise FatalError(WARNING_AS_ERROR) @@ -198,7 +198,7 @@ def Warn(ToolName, Message, File=None, Line=None, ExtraData=None): ## Log ERROR message # # Once an error messages is logged, the tool's execution will be broken by -# raising an execption. If you don't want to break the execution later, you +# raising an exception. If you don't want to break the execution later, you # can give "RaiseError" with "False" value. # # @param ToolName The name of the tool. If not given, the name of caller @@ -208,7 +208,7 @@ def Warn(ToolName, Message, File=None, Line=None, ExtraData=None): # @param File The name of file which caused the error. # @param Line The line number in the "File" which caused the warning. # @param ExtraData More information associated with "Message" -# @param RaiseError Raise an exception to break the tool's executuion if +# @param RaiseError Raise an exception to break the tool's execution if # it's True. This is the default behavior. # def Error(ToolName, ErrorCode, Message=None, File=None, Line=None, \ diff --git a/BaseTools/Source/Python/UPT/Logger/StringTable.py b/BaseTools/Source/Python/UPT/Logger/StringTable.py index 061943925a..d815d9cf89 100644 --- a/BaseTools/Source/Python/UPT/Logger/StringTable.py +++ b/BaseTools/Source/Python/UPT/Logger/StringTable.py @@ -135,7 +135,7 @@ ERR_INF_PARSER_LIBRARY_SECTION_CONTENT_ERROR = \ ERR_INF_PARSER_LIBRARY_SECTION_LIBNAME_MISSING = \ _("Format invalid. Please specify a library name.") ERR_INF_PARSER_SOURCES_SECTION_CONTENT_ERROR = \ - _("The format is incorrect. It should be formated as follows: " + _("The format is incorrect. It should be formatted as follows: " "FileName, Family | TagName | ToolCode | FeatureFlagExpr.") ERR_INF_PARSER_PCD_SECTION_TYPE_ERROR = \ _("The PCD section type is incorrect. The value should be this list: %s") @@ -147,10 +147,10 @@ ERR_INF_PARSER_PCD_NAME_FORMAT_ERROR = \ "Should like following: . ") ERR_INF_PARSER_GUID_PPI_PROTOCOL_SECTION_CONTENT_ERROR = \ _("The format is incorrect. " - "It should be formated as follows: CName | FeatureFlag.") + "It should be formatted as follows: CName | FeatureFlag.") ERR_INF_PARSER_PACKAGE_SECTION_CONTENT_ERROR = \ _("The format is incorrect. " - "It should be formated as follows: .") + "It should be formatted as follows: .") ERR_INF_PARSER_PCD_TAIL_COMMENTS_INVALID = \ _("The format is incorrect. " "Multiple usage descriptions must be described on subsequent lines.") @@ -197,7 +197,7 @@ ERR_INF_PARSER_FILE_MISS_DEFINE = \ _("The following file listed in the module " "directory is not listed in the INF: %s") ERR_INF_PARSER_VERSION_NUMBER_DEPRICATED = \ - _("VERSION_NUMBER depricated. " + _("VERSION_NUMBER deprecated. " "The INF file %s should be modified to use the VERSION_STRING instead.") ERR_INF_PARSER_VER_EXIST_BOTH_NUM_STR = \ _("The INF file %s defines both VERSION_NUMBER and VERSION_STRING, " @@ -585,7 +585,7 @@ _("Only a distribution file name without a path is allowed for " "the distribution to be replaced during replace. Current given: '%s'.") ERR_UNIPARSE_DBLQUOTE_UNMATCHED = \ _("Only Language entry can contain a couple of matched quote in one line") -ERR_UNIPARSE_NO_SECTION_EXIST = _("No PakcageDef or ModuleDef section exists in the UNI file.") +ERR_UNIPARSE_NO_SECTION_EXIST = _("No PackageDef or ModuleDef section exists in the UNI file.") ERR_UNIPARSE_STRNAME_FORMAT_ERROR = _("The String Token Name %s must start with \"STR_\"") ERR_UNIPARSE_SEP_LANGENTRY_LINE = _("Each should be in a separate line :%s.") ERR_UNIPARSE_MULTI_ENTRY_EXIST = \ @@ -724,7 +724,7 @@ _("Incorrect GUID value format, must be # diff --git a/BaseTools/Source/Python/UPT/MkPkg.py b/BaseTools/Source/Python/UPT/MkPkg.py index 053d115547..3dc18ac6eb 100644 --- a/BaseTools/Source/Python/UPT/MkPkg.py +++ b/BaseTools/Source/Python/UPT/MkPkg.py @@ -194,7 +194,7 @@ def Main(Options = None): ContentFileClosed = True # - # Add Md5Sigature + # Add Md5Signature # DistPkg.Header.Signature = md5(open(str(ContentFile), 'rb').read()).hexdigest() # diff --git a/BaseTools/Source/Python/UPT/Object/Parser/DecObject.py b/BaseTools/Source/Python/UPT/Object/Parser/DecObject.py index 302d3050aa..fab4be351f 100644 --- a/BaseTools/Source/Python/UPT/Object/Parser/DecObject.py +++ b/BaseTools/Source/Python/UPT/Object/Parser/DecObject.py @@ -171,7 +171,7 @@ class _DecItemBaseObject(_DecComments): ## DecDefineObject # -# Class to hold define section infomation +# Class to hold define section information # class DecDefineObject(_DecBaseObject): def __init__(self, PkgFullName): @@ -520,7 +520,7 @@ class DecGuidObject(DecGuidObjectBase): ## DecPpiObject # -# Class for PPI seciont +# Class for PPI section # # @param DecGuidObjectBase: Dec Guid Object Base # diff --git a/BaseTools/Source/Python/UPT/Parser/DecParser.py b/BaseTools/Source/Python/UPT/Parser/DecParser.py index f7eeb84127..92bd64b9d9 100644 --- a/BaseTools/Source/Python/UPT/Parser/DecParser.py +++ b/BaseTools/Source/Python/UPT/Parser/DecParser.py @@ -705,7 +705,7 @@ class _DecGuid(_DecBase): ## _DecUserExtension # -# Parse user extention section +# Parse user extension section # class _DecUserExtension(_DecBase): def __init__(self, RawData): @@ -1033,7 +1033,7 @@ class Dec(_DecBase, _DecComments): SectionNames.append(SectionName) # # In DEC specification, all section headers have at most two part: - # SectionName.Arch except UserExtention + # SectionName.Arch except UserExtension # if len(ItemList) > 2: self._LoggerError(ST.ERR_DECPARSE_SECTION_SUBTOOMANY % Item) diff --git a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py index c314892adf..53b62621dc 100644 --- a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py +++ b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py @@ -46,7 +46,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo, CurrentInfFileName): FileGuidString = "" VerString = "" - OrignalString = String + OriginalString = String String = String.strip() if not String: return None, None @@ -78,7 +78,7 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo, CurrentInfFileName): # # To deal with library instance specified by file name # - FileLinesList = GetFileLineContent(String, WorkSpace, LineNo, OrignalString) + FileLinesList = GetFileLineContent(String, WorkSpace, LineNo, OriginalString) ReFindFileGuidPattern = re.compile("^\s*FILE_GUID\s*=.*$") diff --git a/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py index 5dc00affad..a7b59d958c 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py @@ -413,7 +413,7 @@ class DecPomAlignment(PackageObject): # # get a non-overlap set of include path, IncludePathList should be - # sorted, and path should be end with path seperator '\' + # sorted, and path should be end with path separator '\' # NonOverLapList = [] for Path1 in IncludePathList: @@ -424,7 +424,7 @@ class DecPomAlignment(PackageObject): NonOverLapList.append(Path1) # # revert the list so the longest path shown first in list, also need - # to remove the extra path seperator '\' + # to remove the extra path separator '\' # as this list is used to search the supported Arch info # for IndexN in range (0, len(IncludePathList)): diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py index 2e83c247ed..d01481727b 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py @@ -293,7 +293,7 @@ class InfPomAlignment(ModuleObject): self.SetUserExtensionList(self.GetUserExtensionList() + [UserExtension]) # # Get all meta-file header information - # the record is list of items formated: + # the record is list of items formatted: # [LineValue, Arch, StartLine, ID, Third] # InfHeaderObj = self.Parser.InfHeader diff --git a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py index 239078d019..68f281b521 100644 --- a/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py +++ b/BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py @@ -155,10 +155,10 @@ def GenModuleHeaderUserExt(DefineObj, ArchString): ## Generate the define statement that will be put into userextension # Not support comments. # -# @param HeaderComment: the original header comment (# not remvoed) +# @param HeaderComment: the original header comment (# not removed) # @param Name: the definition keyword, should not be empty or none # @param Value: the definition keyword value -# @param TailComment: the original Tail comment (# not remvoed) +# @param TailComment: the original Tail comment (# not removed) # # @return: the regenerated define statement # diff --git a/BaseTools/Source/Python/UPT/RmPkg.py b/BaseTools/Source/Python/UPT/RmPkg.py index f1d141c736..3d97295362 100644 --- a/BaseTools/Source/Python/UPT/RmPkg.py +++ b/BaseTools/Source/Python/UPT/RmPkg.py @@ -242,8 +242,8 @@ def RemoveDist(Guid, Version, StoredDistFile, DataBase, WorkspaceDir, ForceRemov # # check whether modified by users # - Md5Sigature = md5(open(str(Path), 'rb').read()) - if Md5Sum != Md5Sigature.hexdigest(): + Md5Signature = md5(open(str(Path), 'rb').read()) + if Md5Sum != Md5Signature.hexdigest(): Logger.Info(ST.MSG_CONFIRM_REMOVE2 % Path) Input = stdin.readline() Input = Input.replace('\r', '').replace('\n', '') diff --git a/BaseTools/Source/Python/UPT/UnitTest/DecParserUnitTest.py b/BaseTools/Source/Python/UPT/UnitTest/DecParserUnitTest.py index afea4a438b..752a9ea446 100644 --- a/BaseTools/Source/Python/UPT/UnitTest/DecParserUnitTest.py +++ b/BaseTools/Source/Python/UPT/UnitTest/DecParserUnitTest.py @@ -61,9 +61,9 @@ class MacroParserTestCase(unittest.TestCase): self.dec = _DecBase(FileContent('dummy', [])) def testCorrectMacro(self): - self.dec._MacroParser('DEFINE MARCRO1 = test1') - self.failIf('MARCRO1' not in self.dec._LocalMacro) - self.assertEqual(self.dec._LocalMacro['MARCRO1'], 'test1') + self.dec._MacroParser('DEFINE MACRO1 = test1') + self.failIf('MACRO1' not in self.dec._LocalMacro) + self.assertEqual(self.dec._LocalMacro['MACRO1'], 'test1') def testErrorMacro1(self): # Raise fatal error, macro name must be upper case letter -- cgit v1.2.3