]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix typing after reorganization
authorBob Halley <halley@dnspython.org>
Sat, 21 Sep 2024 16:41:14 +0000 (09:41 -0700)
committerBob Halley <halley@dnspython.org>
Sat, 21 Sep 2024 16:41:14 +0000 (09:41 -0700)
dns/zonefile.py

index 09efa2b5b4e22d562187e40f36b169fdd9668b11..d74510b29f008c0ab03e16a5ac2bd211c81fde5f 100644 (file)
@@ -281,8 +281,8 @@ class Reader:
         # Make names
         mod = ""
         sign = "+"
-        offset = 0
-        width = 0
+        offset = "0"
+        width = "0"
         base = "d"
         g1 = is_generate1.match(side)
         if g1:
@@ -295,7 +295,7 @@ class Reader:
                 mod, sign, offset = g2.groups()
                 if sign == "":
                     sign = "+"
-                width = 0
+                width = "0"
                 base = "d"
             else:
                 g3 = is_generate3.match(side)
@@ -305,15 +305,15 @@ class Reader:
                         sign = "+"
                     base = "d"
 
-        offset = int(offset)
-        width = int(width)
+        ioffset = int(offset)
+        iwidth = int(width)
 
         if sign not in ["+", "-"]:
             raise dns.exception.SyntaxError(f"invalid offset sign {sign}")
         if base not in ["d", "o", "x", "X", "n", "N"]:
             raise dns.exception.SyntaxError(f"invalid type {base}")
 
-        return mod, sign, offset, width, base
+        return mod, sign, ioffset, iwidth, base
 
     def _generate_line(self):
         # range lhs [ttl] [class] type rhs [ comment ]