Skip to content

Commit d3c9c2e

Browse files
mdboomCopilot
andauthored
Update toolshed/check_cython_abi.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9ea219d commit d3c9c2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

toolshed/check_cython_abi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def pyx_capi_to_json(d: dict[str, object]) -> dict[str, str]:
6767
def extract_name(v: object) -> str:
6868
v = str(v)
6969
match = re.match(r'<capsule object "([^\"]+)" at 0x[0-9a-fA-F]+>', v)
70-
assert match, f"Could not parse __pyx_capi__ entry: {v}"
70+
if match is None:
71+
raise ValueError(f"Could not parse __pyx_capi__ entry: {v}")
7172
return match.group(1)
7273

7374
# Sort the dictionary by keys to make diffs in the JSON files smaller

0 commit comments

Comments
 (0)