From ea3478e3774455cb41aa53c07f5962bd682f86c5 Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Tue, 28 Jun 2022 14:20:13 -0400 Subject: [PATCH] tools: Extract ROOT_DIR. Signed-off-by: Zixuan James Li --- tools/run-mypy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/run-mypy b/tools/run-mypy index ed926fc692..d96a1a1023 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -8,9 +8,10 @@ from typing import List from zulint import lister TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) -os.chdir(os.path.dirname(TOOLS_DIR)) +ROOT_DIR = os.path.dirname(TOOLS_DIR) +os.chdir(ROOT_DIR) -sys.path.append(os.path.dirname(TOOLS_DIR)) +sys.path.append(ROOT_DIR) from tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok exclude = """