-from re import compile
+# Don't clobber the global compile() with a named import.
+import re
+
from typing import Optional
from djbdns.common import *
# The regex to match dnscache log lines.
-dnscache_log_re = compile(fr'({timestamp_pat}) (\w+)(.*)')
+dnscache_log_re = re.compile(fr'({timestamp_pat}) (\w+)(.*)')
def decode_client(words : list, i : int):
-from re import compile
+# Don't clobber the global compile() with a named import.
+import re
+
from typing import Optional
from djbdns.common import *
ip_pat = r'[0-9a-f]{8,32}'
# The regex to match tinydns log lines.
-tinydns_log_re = compile(
+tinydns_log_re = re.compile(
rf'({timestamp_pat}) ({ip_pat}):({hex4_pat}):({hex4_pat}) ([\+\-IC/]) ({hex4_pat}) (.*)'
)