From b5a6878b57c9b4a66fca23f611093da2b18872f7 Mon Sep 17 00:00:00 2001 From: Alex Langenfeld Date: Wed, 12 Jun 2024 13:05:15 -0500 Subject: [PATCH] fix build_check_call for py3.8 (#22506) ## How I Tested These Changes existing tests --- python_modules/dagster/dagster/_check/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_modules/dagster/dagster/_check/__init__.py b/python_modules/dagster/dagster/_check/__init__.py index 54333418a72c2..29796c2bef1ee 100644 --- a/python_modules/dagster/dagster/_check/__init__.py +++ b/python_modules/dagster/dagster/_check/__init__.py @@ -2011,7 +2011,8 @@ def build_check_call_str( else: return name # no-op else: - if origin is Annotated and args: + # 3.9+: origin is Annotated, 3.8: origin == args[0] + if (origin is Annotated and args) or (len(args) == 1 and args[0] == origin): return build_check_call_str(args[0], f"{name}", eval_ctx) pair_left, pair_right = _container_pair_args(args, eval_ctx)