From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3DA88224DD12B for ; Wed, 28 Mar 2018 16:55:44 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 17:02:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,374,1517904000"; d="scan'208";a="28916598" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 17:02:22 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Liming Gao , Yonghong Zhu Date: Wed, 28 Mar 2018 17:02:20 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH v1 4/4] BaseTools: cleanup class heirarchy X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2018 23:55:44 -0000 remove totally empty classes from class heirarchy Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DecClassObject.py | 13 +------------ BaseTools/Source/Python/Common/DscClassObject.py | 13 +------------ BaseTools/Source/Python/Common/FdfClassObject.py | 12 +----------- BaseTools/Source/Python/Common/InfClassObject.py | 13 +------------ BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 13 +------------ 5 files changed, 5 insertions(+), 59 deletions(-) diff --git a/BaseTools/Source/Python/Common/DecClassObject.py b/BaseTools/Source/Python/Common/DecClassObject.py index d7c70a7336a0..4d267f147f05 100644 --- a/BaseTools/Source/Python/Common/DecClassObject.py +++ b/BaseTools/Source/Python/Common/DecClassObject.py @@ -48,21 +48,10 @@ Section = {TAB_UNKNOWN.upper() : MODEL_UNKNOWN, } -## DecObject -# -# This class defined basic Dec object which is used by inheriting -# -# @param object: Inherited from object class -# -class DecObject(object): - def __init__(self): - object.__init__() - ## Dec # # This class defined the structure used in Dec object # -# @param DecObject: Inherited from DecObject class # @param Filename: Input value for Filename of Dec file, default is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -82,7 +71,7 @@ class DecObject(object): # @var Contents: To store value for Contents, it is a structure as DecContents # @var KeyList: To store value for KeyList, a list for all Keys used in Dec # -class Dec(DecObject): +class Dec(object): def __init__(self, Filename=None, IsToDatabase=False, IsToPackage=False, WorkspaceDir=None, Database=None, SupArchList=DataType.ARCH_LIST): self.Identification = Identification() self.Package = PackageClass() diff --git a/BaseTools/Source/Python/Common/DscClassObject.py b/BaseTools/Source/Python/Common/DscClassObject.py index c2fa1c275a2d..d14b6a718522 100644 --- a/BaseTools/Source/Python/Common/DscClassObject.py +++ b/BaseTools/Source/Python/Common/DscClassObject.py @@ -54,21 +54,10 @@ Section = {TAB_UNKNOWN.upper() : MODEL_UNKNOWN, TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION } -## DscObject -# -# This class defined basic Dsc object which is used by inheriting -# -# @param object: Inherited from object class -# -class DscObject(object): - def __init__(self): - object.__init__() - ## Dsc # # This class defined the structure used in Dsc object # -# @param DscObject: Inherited from InfObject class # @param Ffilename: Input value for Ffilename of Inf file, default is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -89,7 +78,7 @@ class DscObject(object): # @var WorkspaceDir: To store value for WorkspaceDir # @var KeyList: To store value for KeyList, a list for all Keys used in Dec # -class Dsc(DscObject): +class Dsc(object): _NullClassIndex = 0 def __init__(self, Filename=None, IsToDatabase=False, IsToPlatform=False, WorkspaceDir=None, Database=None): diff --git a/BaseTools/Source/Python/Common/FdfClassObject.py b/BaseTools/Source/Python/Common/FdfClassObject.py index 3e7d44954c88..b3b45f634ed8 100644 --- a/BaseTools/Source/Python/Common/FdfClassObject.py +++ b/BaseTools/Source/Python/Common/FdfClassObject.py @@ -19,25 +19,15 @@ from Table.TableFdf import TableFdf from CommonDataClass.DataClass import MODEL_FILE_FDF, MODEL_PCD, MODEL_META_DATA_COMPONENT from String import NormPath -## FdfObject -# -# This class defined basic Fdf object which is used by inheriting -# -# @param object: Inherited from object class -# -class FdfObject(object): - def __init__(self): - object.__init__() ## Fdf # # This class defined the structure used in Fdf object # -# @param FdfObject: Inherited from FdfObject class # @param Filename: Input value for Ffilename of Fdf file, default is None # @param WorkspaceDir: Input value for current workspace directory, default is None # -class Fdf(FdfObject): +class Fdf(object): def __init__(self, Filename = None, IsToDatabase = False, WorkspaceDir = None, Database = None): self.WorkspaceDir = WorkspaceDir self.IsToDatabase = IsToDatabase diff --git a/BaseTools/Source/Python/Common/InfClassObject.py b/BaseTools/Source/Python/Common/InfClassObject.py index f24e4e41a0c1..89e110ea5e7a 100644 --- a/BaseTools/Source/Python/Common/InfClassObject.py +++ b/BaseTools/Source/Python/Common/InfClassObject.py @@ -131,21 +131,10 @@ class InfHeader(ModuleHeaderClass): def __contains__(self, key): return key in self._Mapping_ -## InfObject -# -# This class defined basic Inf object which is used by inheriting -# -# @param object: Inherited from object class -# -class InfObject(object): - def __init__(self): - object.__init__() - ## Inf # # This class defined the structure used in Inf object # -# @param InfObject: Inherited from InfObject class # @param Ffilename: Input value for Ffilename of Inf file, default is None # @param IsMergeAllArches: Input value for IsMergeAllArches # True is to merge all arches @@ -163,7 +152,7 @@ class InfObject(object): # @var WorkspaceDir: To store value for WorkspaceDir # @var KeyList: To store value for KeyList, a list for all Keys used in Inf # -class Inf(InfObject): +class Inf(object): def __init__(self, Filename=None, IsToDatabase=False, IsToModule=False, WorkspaceDir=None, Database=None, SupArchList=DataType.ARCH_LIST): self.Identification = Identification() self.Module = ModuleClass() diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index ba478f9ecf10..b60e8f50e4f2 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -1900,25 +1900,14 @@ class DecParser(MetaFileParser): } -## FdfObject -# -# This class defined basic Fdf object which is used by inheriting -# -# @param object: Inherited from object class -# -class FdfObject(object): - def __init__(self): - object.__init__() - ## Fdf # # This class defined the structure used in Fdf object # -# @param FdfObject: Inherited from FdfObject class # @param Filename: Input value for Ffilename of Fdf file, default is None # @param WorkspaceDir: Input value for current workspace directory, default is None # -class Fdf(FdfObject): +class Fdf(object): def __init__(self, Filename = None, IsToDatabase = False, WorkspaceDir = None, Database = None): self.WorkspaceDir = WorkspaceDir self.IsToDatabase = IsToDatabase -- 2.16.2.windows.1