>From 058da4f4835ad594bf54842926e0f7a8ca36e488 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <nicolas@debian.org>
Date: Thu, 6 Nov 2025 21:32:47 +0100
Subject: [PATCH 6/7] style: replace collections.namedtuple with
 typing.NamedTuple in deb822.py

---
 src/debian/deb822.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/debian/deb822.py b/src/debian/deb822.py
index 1592ec9..4929583 100644
--- a/src/debian/deb822.py
+++ b/src/debian/deb822.py
@@ -257,6 +257,7 @@ from typing import (
     List,
     Mapping,
     MutableMapping,
+    NamedTuple,
     Optional,
     overload,
     Text,
@@ -1393,10 +1394,13 @@ class PkgRelation:
         r'(?P<enabled>\!)?'
         r'(?P<profile>[^\s]+)')
 
-    ArchRestriction = collections.namedtuple('ArchRestriction',
-                                             ['enabled', 'arch'])
-    BuildRestriction = collections.namedtuple('BuildRestriction',
-                                              ['enabled', 'profile'])
+    class ArchRestriction(NamedTuple):
+        enabled: bool
+        arch: str
+
+    class BuildRestriction(NamedTuple):
+        enabled: bool
+        profile: str
 
     if TYPE_CHECKING:
         class ParsedRelation(TypedDict):
-- 
2.47.3

