chore: import upstream snapshot with attribution
CodeQL / Analyze (python) (push) Failing after 0s
Release / Build (push) Failing after 1s
Test Suite / Unit Tests (push) Failing after 0s
Release / Release (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:18:10 +08:00
commit fbfefa28d3
384 changed files with 46941 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
"""
This utility function extracts the code from a given string.
"""
import re
def extract_code(code: str) -> str:
"""
Module for extracting code
"""
pattern = r"```(?:python)?\n(.*?)```"
match = re.search(pattern, code, re.DOTALL)
return match.group(1) if match else code