From f3ca0f6c7d3ef378e0058b6a0c7abd8ed9f7d046 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 20 Nov 2023 14:16:57 -0800 Subject: [PATCH] Fix warning printing --- tl_io.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tl_io.py b/tl_io.py index f4a309eb..e4c4a016 100644 --- a/tl_io.py +++ b/tl_io.py @@ -14,6 +14,8 @@ import subprocess import os import argparse +if sys.version_info.major == 3: + from typing import Set # noqa if sys.version_info.major == 3: popentext = dict(universal_newlines=True) @@ -70,7 +72,7 @@ def warn(msg): if test_mode: assert 0 -warned = argparse.Namespace() +warned = set() # type: Set[str] def warn_once_no_assert(msg): if msg not in warned and not args.quiet: