From b4f1fa047e753ba7f356d6ee49ff776532f9e78f Mon Sep 17 00:00:00 2001 From: Gunnar Andersson Date: Sun, 20 Aug 2023 13:03:00 +0200 Subject: [PATCH] Define AST without inheriting Namespace --- ifex/model/ifex_ast.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ifex/model/ifex_ast.py b/ifex/model/ifex_ast.py index d8c5aa20..91dd6047 100644 --- a/ifex/model/ifex_ast.py +++ b/ifex/model/ifex_ast.py @@ -633,10 +633,13 @@ class Namespace: @dataclass -class AST(Namespace): +class AST(): """ Dataclass used to represent root element in a IFEX AST. - Behaviour is inherited from Namespace class. """ - - pass + name: Optional[str] = str() # Represents name of file. Usually better to name the Namespaces and Interfaces + description: Optional[str] = str() + major_version: Optional[int] = None # Version of file. Usually better to version Interfaces, and Namespaces! + minor_version: Optional[int] = None # ------ " ------ + includes: Optional[List[Include]] = field(default_factory=EmptyList) + namespaces: Optional[List[Namespace]] = field(default_factory=EmptyList)