From 25ccc97563220da94053e519a19d00c941fac366 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Mon, 12 Sep 2022 16:49:58 -0700 Subject: [PATCH 1/2] Fix stubtest custom_typeshed_dir regression Fixes #13654, caused by #13629 --- mypy/stubtest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mypy/stubtest.py b/mypy/stubtest.py index ff59a8f682e65..49f7dc0f8ea38 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -1597,6 +1597,7 @@ def test_stubs(args: _Arguments, use_builtins_fixtures: bool = False) -> int: options = Options() options.incremental = False options.custom_typeshed_dir = args.custom_typeshed_dir + options.abs_custom_typeshed_dir = os.path.abspath(args.custom_typeshed_dir) options.config_file = args.mypy_config_file options.use_builtins_fixtures = use_builtins_fixtures From 07a3a17db619c6797cb9d4e29ada8d2451506a3b Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Mon, 12 Sep 2022 18:03:24 -0700 Subject: [PATCH 2/2] fixup --- mypy/stubtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mypy/stubtest.py b/mypy/stubtest.py index 49f7dc0f8ea38..718a6cfa62547 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -1597,7 +1597,8 @@ def test_stubs(args: _Arguments, use_builtins_fixtures: bool = False) -> int: options = Options() options.incremental = False options.custom_typeshed_dir = args.custom_typeshed_dir - options.abs_custom_typeshed_dir = os.path.abspath(args.custom_typeshed_dir) + if options.custom_typeshed_dir: + options.abs_custom_typeshed_dir = os.path.abspath(args.custom_typeshed_dir) options.config_file = args.mypy_config_file options.use_builtins_fixtures = use_builtins_fixtures