Skip to content

Commit 83cbc9b

Browse files
Copilotjason810496
andcommitted
Fix code review feedback: remove redundant code and use Tuple from typing
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
1 parent 4dd0b7d commit 83cbc9b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/compelete_missing_test_for_operation.py

100644100755
File mode changed.

scripts/scripts_utils/operation_test_ast.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import libcst as cst
22
import re
3-
from typing import Dict, Set, List
3+
from typing import Dict, Set, List, Tuple
44
from scripts_utils.common_ast import MethodInfo
55

66

@@ -143,7 +143,6 @@ def transform_docstring(self, docstring: str) -> str:
143143
"""Transform docstring for async version."""
144144
# Replace 'synchronously' with 'asynchronously'
145145
modified = docstring.replace("using PGMQOperation.", "using PGMQOperation asynchronously.")
146-
modified = modified.replace("Test ", "Test ") # Keep Test prefix
147146

148147
# Add 'asynchronously' before the period if not already present
149148
if "asynchronously" not in modified and not modified.endswith("asynchronously."):
@@ -230,7 +229,7 @@ def leave_Module(
230229

231230
def parse_test_functions_from_module(
232231
module_tree: cst.Module,
233-
) -> tuple[List[MethodInfo], Set[str]]:
232+
) -> Tuple[List[MethodInfo], Set[str]]:
234233
"""
235234
Parse test functions from module.
236235

0 commit comments

Comments
 (0)