From 4690017b2508eff0930e072427bfc923eb6e33c2 Mon Sep 17 00:00:00 2001 From: Jean Snyman Date: Fri, 31 May 2024 14:00:58 +0100 Subject: [PATCH] Fix Pylint plugin bug which caused duplicate imports Signed-off-by: Jean Snyman --- keylime/models/base/pylint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keylime/models/base/pylint.py b/keylime/models/base/pylint.py index 18f49968e..94ff5a837 100644 --- a/keylime/models/base/pylint.py +++ b/keylime/models/base/pylint.py @@ -27,6 +27,9 @@ def register(_linter: "PyLinter") -> None: an abstract syntax tree (AST) and iterating through the ``import`` statements contained within. Called by Pylint on plugin registration. """ + if base_exports: + return + path = os.path.dirname(os.path.realpath(__file__)) path = os.path.join(path, "__init__.py")