Skip to content

Commit

Permalink
fix typing after reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
rthalley committed Sep 21, 2024
1 parent ab59c9a commit 2d6e17c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dns/zonefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ def _parse_modify(self, side: str) -> Tuple[str, str, int, int, str]:
# Make names
mod = ""
sign = "+"
offset = 0
width = 0
offset = "0"
width = "0"
base = "d"
g1 = is_generate1.match(side)
if g1:
Expand All @@ -295,7 +295,7 @@ def _parse_modify(self, side: str) -> Tuple[str, str, int, int, str]:
mod, sign, offset = g2.groups()
if sign == "":
sign = "+"
width = 0
width = "0"
base = "d"
else:
g3 = is_generate3.match(side)
Expand All @@ -305,15 +305,15 @@ def _parse_modify(self, side: str) -> Tuple[str, str, int, int, str]:
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 ]
Expand Down

0 comments on commit 2d6e17c

Please sign in to comment.