From 3fb6b990af3ec44e0b0d4e14d76d8c4bfba9692b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Wed, 21 May 2025 15:19:25 +0200 Subject: [PATCH] Shorten syntax to access Name object dns.name all over the place does not make it easier to read the code at all, and I'm going to add lot more code here. --- bin/tests/system/isctest/name.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/tests/system/isctest/name.py b/bin/tests/system/isctest/name.py index d992ae3fce..867380a8f2 100644 --- a/bin/tests/system/isctest/name.py +++ b/bin/tests/system/isctest/name.py @@ -9,12 +9,12 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -import dns.name +from dns.name import Name -def prepend_label(label: str, name: dns.name.Name) -> dns.name.Name: - return dns.name.Name((label,) + name.labels) +def prepend_label(label: str, name: Name) -> Name: + return Name((label,) + name.labels) -def len_wire_uncompressed(name: dns.name.Name) -> int: +def len_wire_uncompressed(name: Name) -> int: return len(name) + sum(map(len, name.labels))