Skip to content

Commit 1518f71

Browse files
committed
refactor: use lambda instead of functools.partial
functools.partial with method is deprecated in Python 3.13
1 parent 03ec286 commit 1518f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/robot/src/robotcode/robot/utils/markdownformatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def format_url(self, text: str) -> str:
120120
def _format_url(self, text: str, format_as_image: bool = True) -> str:
121121
if "://" not in text:
122122
return text
123-
return self._url.sub(functools.partial(self._replace_url, format_as_image), text)
123+
return self._url.sub(lambda m: self._replace_url(format_as_image, m), text)
124124

125125
def _replace_url(self, format_as_image: bool, match: re.Match[str]) -> str:
126126
pre = match.group(1)

0 commit comments

Comments
 (0)