id = int(chunks[2], 16)
words[i] += f" (id {id})"
-def decode_ip(words, i):
+def decode_ip(words : list, i : int):
r"""
Helper function to decode the ip field in a dnscache log
entry.
"""
words[i] = convert_ip(words[i])
-def decode_ttl(words, i):
+def decode_ttl(words : list, i : int):
words[i] = f"TTL={words[i]}"
-def decode_serial(words, i):
+def decode_serial(words : list, i : int):
serial = int(words[i])
words[i] = f"#{serial}"
-def decode_type(words, i):
+def decode_type(words : list, i : int):
qt = words[i]
words[i] = query_type.get(int(qt), qt)
-def handle_dnscache_log(line) -> typing.Optional[str]:
+def handle_dnscache_log(line : str) -> typing.Optional[str]:
"""
Handle a single log line if it matches the ``dnscache_log_re`` regex.