Skip to content

Commit 9d0adfe

Browse files
committed
Fix reverse bitstream step: use heredoc to avoid indentation error
The inline Python passed via `python3 -c` had indented top-level statements, causing an IndentationError on CI. Switch to a heredoc (`<< 'PYEOF'`) so the script is fed via stdin with correct indentation. Also rename `reversed` to `reversed_data` to avoid shadowing the builtin. https://claude.ai/code/session_01QmPirfEXJ1bsJHb9i98uGS
1 parent b374639 commit 9d0adfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222

2323
- name: Reverse bitstream
2424
run: |
25-
python3 -c "
25+
python3 << 'PYEOF'
2626
with open('src/fpga/output_files/ap_core.rbf', 'rb') as f:
2727
data = f.read()
28-
reversed = bytes(int('{:08b}'.format(b)[::-1], 2) for b in data)
28+
reversed_data = bytes(int('{:08b}'.format(b)[::-1], 2) for b in data)
2929
with open('src/fpga/output_files/bitstream.rbf_r', 'wb') as f:
30-
f.write(reversed)
31-
"
30+
f.write(reversed_data)
31+
PYEOF
3232
3333
- name: Package core
3434
run: |

0 commit comments

Comments
 (0)