From: Bob Halley Date: Sat, 21 Sep 2024 16:41:14 +0000 (-0700) Subject: fix typing after reorganization X-Git-Tag: v2.7.0rc1~2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2d6e17c0393343c0e022fa9ab1a00c2d5c6a3736;p=thirdparty%2Fdnspython.git fix typing after reorganization --- diff --git a/dns/zonefile.py b/dns/zonefile.py index 09efa2b5..d74510b2 100644 --- a/dns/zonefile.py +++ b/dns/zonefile.py @@ -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 ]