From 10df8fa2b3c72ed8cde3576eba900b54f5ba8397 Mon Sep 17 00:00:00 2001 From: actionless Date: Wed, 11 Sep 2024 22:25:20 +0200 Subject: [PATCH] fix(pikaur_meta_helpers: dep_tree): use NamedTuple instead of dataclass --- pikaur_meta_helpers/dep_tree.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pikaur_meta_helpers/dep_tree.py b/pikaur_meta_helpers/dep_tree.py index 4918447ea..a5f0105ca 100644 --- a/pikaur_meta_helpers/dep_tree.py +++ b/pikaur_meta_helpers/dep_tree.py @@ -1,6 +1,6 @@ import sys from dataclasses import dataclass -from typing import cast +from typing import NamedTuple, cast import pyalpm @@ -51,8 +51,7 @@ def __post_init__(self) -> None: self.description = self.package.desc -@dataclass -class StackItem: +class StackItem(NamedTuple): item_type: str # 'pkg' or 'title' content: str # Package name or title text level: int # Current level in the dependency tree