From 8113074d24f89faec0e28084ff474903b6a6fe0c Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Mon, 18 Sep 2023 10:37:24 -0700 Subject: [PATCH 1/2] switch | to unions to be 3.8 compatible --- pythonFiles/vscode_pytest/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonFiles/vscode_pytest/__init__.py b/pythonFiles/vscode_pytest/__init__.py index 21165a02bf4b..26df31b1a628 100644 --- a/pythonFiles/vscode_pytest/__init__.py +++ b/pythonFiles/vscode_pytest/__init__.py @@ -609,7 +609,7 @@ class ExecutionPayloadDict(Dict): class EOTPayloadDict(TypedDict): """A dictionary that is used to send a end of transmission post request to the server.""" - command_type: Literal["discovery"] | Literal["execution"] + command_type: Union(Literal["discovery"], Literal["execution"]) eot: bool @@ -672,7 +672,7 @@ def default(self, obj): def send_post_request( - payload: ExecutionPayloadDict | DiscoveryPayloadDict | EOTPayloadDict, + payload: Union(ExecutionPayloadDict, DiscoveryPayloadDict, EOTPayloadDict), cls_encoder=None, ): """ From 6d23a19ace833f3e536c88dbc7d63a31ddb78381 Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Mon, 18 Sep 2023 10:41:22 -0700 Subject: [PATCH 2/2] fix brackets --- pythonFiles/vscode_pytest/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonFiles/vscode_pytest/__init__.py b/pythonFiles/vscode_pytest/__init__.py index 26df31b1a628..f5827f87e1b4 100644 --- a/pythonFiles/vscode_pytest/__init__.py +++ b/pythonFiles/vscode_pytest/__init__.py @@ -609,7 +609,7 @@ class ExecutionPayloadDict(Dict): class EOTPayloadDict(TypedDict): """A dictionary that is used to send a end of transmission post request to the server.""" - command_type: Union(Literal["discovery"], Literal["execution"]) + command_type: Union[Literal["discovery"], Literal["execution"]] eot: bool @@ -672,7 +672,7 @@ def default(self, obj): def send_post_request( - payload: Union(ExecutionPayloadDict, DiscoveryPayloadDict, EOTPayloadDict), + payload: Union[ExecutionPayloadDict, DiscoveryPayloadDict, EOTPayloadDict], cls_encoder=None, ): """