fix: 3 syntax errors in perf_bottleneck_finder.py (#211) #215

Open
Rockachopa wants to merge 1 commits from fix/211 into main
Owner

Fixes #211

Bugs fixed

  1. Line 116: Regex pattern had broken quote escaping. The character class inside a double-quoted raw string caused Python to misinterpret escape sequences. Fixed by using hex escapes in a single-quoted raw string.

  2. Lines 509-510: return statement with join() was split across two lines. Merged into single line.

  3. Line 524: global declaration appeared after the variable was already used. Removed redundant global declaration (variable is module-level).

Verification

  • python3 -m py_compile scripts/perf_bottleneck_finder.py passes
  • pytest tests/test_perf_bottleneck_finder.py should now collect and run
Fixes #211 ## Bugs fixed 1. **Line 116**: Regex pattern had broken quote escaping. The character class inside a double-quoted raw string caused Python to misinterpret escape sequences. Fixed by using hex escapes in a single-quoted raw string. 2. **Lines 509-510**: return statement with join() was split across two lines. Merged into single line. 3. **Line 524**: global declaration appeared after the variable was already used. Removed redundant global declaration (variable is module-level). ## Verification - python3 -m py_compile scripts/perf_bottleneck_finder.py passes - pytest tests/test_perf_bottleneck_finder.py should now collect and run
Rockachopa added 1 commit 2026-04-21 11:20:31 +00:00
fix: 3 syntax errors in perf_bottleneck_finder.py (#211)
Some checks failed
Test / pytest (pull_request) Failing after 16s
ad1d474aee
1. Line 116: regex pattern had broken quote escaping
2. Lines 509-510: return statement split across two lines
3. Line 524: global declaration after first use
Owner

🚫 Cannot merge PR #215 - Merge failed. Reason:

🚫 Cannot merge PR #215 - **Merge failed**. Reason:
Author
Owner

🔎 Merge sweep 2026-04-21: not merging this PR in the current sweep. Blocked by merge conflicts / non-mergeable branch state against main. Rebase/refresh onto the base branch and rerun checks.

🔎 Merge sweep 2026-04-21: not merging this PR in the current sweep. Blocked by merge conflicts / non-mergeable branch state against `main`. Rebase/refresh onto the base branch and rerun checks.
Rockachopa reviewed 2026-04-22 13:53:06 +00:00
Rockachopa left a comment
Author
Owner

Changes suggested — 1 file(s), +4/-4 lines.

Duplicate PR: Duplicate — multiple PRs fix same syntax error (#211). Keep only the most complete (likely #226).

**Changes suggested** — 1 file(s), +4/-4 lines. **Duplicate PR:** Duplicate — multiple PRs fix same syntax error (#211). Keep only the most complete (likely #226).
Rockachopa reviewed 2026-04-22 13:55:53 +00:00
Rockachopa left a comment
Author
Owner

DUPLICATE — same perf_bottleneck_finder.py syntax fix as 6 other PRs (issue #211). Uses hex escapes for quotes which works but is less readable. Also does not properly fix the global statement — comments it out instead of moving it.

Recommendation: Close in favor of #226.

**DUPLICATE** — same perf_bottleneck_finder.py syntax fix as 6 other PRs (issue #211). Uses hex escapes for quotes which works but is less readable. Also does not properly fix the global statement — comments it out instead of moving it. **Recommendation:** Close in favor of #226.
Rockachopa reviewed 2026-04-22 14:14:21 +00:00
Rockachopa left a comment
Author
Owner

Verdict: REQUEST_CHANGES -- DUPLICATE. One of 7 PRs fixing perf_bottleneck_finder.py SyntaxError (issue #211). Uses hex escapes (\x27, \x22) for quotes which works but is unnecessarily obscure. Also removes the global keyword instead of moving it, using a comment instead -- this technically works since Python resolves globals at assignment time, but the comment is misleading. Recommend closing in favor of #226.

Verdict: REQUEST_CHANGES -- DUPLICATE. One of 7 PRs fixing perf_bottleneck_finder.py SyntaxError (issue #211). Uses hex escapes (\x27, \x22) for quotes which works but is unnecessarily obscure. Also removes the global keyword instead of moving it, using a comment instead -- this technically works since Python resolves globals at assignment time, but the comment is misleading. Recommend closing in favor of #226.
claude reviewed 2026-04-22 16:14:22 +00:00
claude left a comment
Member

Uses hex escapes (\x27, \x22) for the regex fix which works but is less readable. The global declaration is commented out rather than moved, which means SLOW_TEST_THRESHOLD_S assignment will create a local variable if called from a function. PR #226 moves the global declaration correctly. Recommend #226 instead.

Uses hex escapes (\x27, \x22) for the regex fix which works but is less readable. The global declaration is commented out rather than moved, which means SLOW_TEST_THRESHOLD_S assignment will create a local variable if called from a function. PR #226 moves the global declaration correctly. Recommend #226 instead.
Some checks failed
Test / pytest (pull_request) Failing after 16s
This pull request has changes conflicting with the target branch.
  • scripts/perf_bottleneck_finder.py
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/211:fix/211
git checkout fix/211
Sign in to join this conversation.