Skip to content

Commit 07ed4b0

Browse files
committed
Change CommandResult to a TypedDict instead of a custom data class
1 parent 843b36b commit 07ed4b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plugins/connection/aws_ssm.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@
327327
import string
328328
import subprocess
329329
import time
330-
from dataclasses import dataclass
331330
from typing import Dict
332331
from typing import List
333332
from typing import NoReturn
334333
from typing import Optional
335334
from typing import Tuple
335+
from typing import TypedDict
336336

337337
try:
338338
import boto3
@@ -436,10 +436,9 @@ def filter_ansi(line: str, is_windows: bool) -> str:
436436
return line
437437

438438

439-
@dataclass
440-
class CommandResult:
439+
class CommandResult(TypedDict):
441440
"""
442-
Custom dataclass for the executed command results.
441+
A dictionary that contains the executed command results.
443442
"""
444443

445444
returncode: int

0 commit comments

Comments
 (0)