tools: Use root-based absolute import for tools.lib, etc.

Mypy can’t follow absolute imports based on directories other than the
root.  This was hiding some type errors due to ignore_missing_imports.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-07-02 23:22:44 -07:00
committed by Tim Abbott
parent 7d71a1a31a
commit 684dad8145
18 changed files with 108 additions and 94 deletions

View File

@@ -5,15 +5,15 @@ import sys
os.environ["RUNNING_OPENAPI_CURL_TEST"] = "1"
# check for the venv
from lib import sanity_check
sanity_check.check_venv(__file__)
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ZULIP_PATH)
os.chdir(ZULIP_PATH)
# check for the venv
from tools.lib import sanity_check
sanity_check.check_venv(__file__)
from zulip import Client
from tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok