From 14ada360bdf3e3ae9952b5f40dca6863a7124fd1 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Tue, 26 May 2020 17:29:28 +0200 Subject: [PATCH] meta: avoid static assertion Avoid raising a static assertion, but use `raise AssertionError()` instead. This silences a complaint from pylint about static parameters to `assert`. --- osbuild/meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osbuild/meta.py b/osbuild/meta.py index 2a2f159e..c0edd0a6 100644 --- a/osbuild/meta.py +++ b/osbuild/meta.py @@ -68,7 +68,7 @@ class ValidationError: elif isinstance(p, int): result += f"[{p}]" else: - assert "new type" + raise AssertionError("new type") return result