Skip to content

Commit 086926c

Browse files
committed
copilot feedback
1 parent 59e6eef commit 086926c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/jsonata/functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def safe_replace_first(s: str, pattern: CompiledPattern, replacement: str) -> Op
733733
r = None
734734
for i in range(0, 10):
735735
try:
736-
r = pattern.sub(replacement, s, count=1)
736+
r = pattern.sub(replacement, s, 1)
737737
break
738738
except Exception as e:
739739
msg = str(e)
@@ -2045,6 +2045,7 @@ def is_regex(value: Optional[Any]) -> bool:
20452045
callable(getattr(value, "search", None))
20462046
and callable(getattr(value, "finditer", None))
20472047
and callable(getattr(value, "sub", None))
2048+
and callable(getattr(value, "split", None))
20482049
)
20492050

20502051
#

0 commit comments

Comments
 (0)