Skip to content

[CI] Restore ruff-format on test_target_codegen_c_host.py - #20253

Closed
LngelKyo wants to merge 1 commit into
apache:mainfrom
LngelKyo:ci/restore-ruff-format-c-host
Closed

[CI] Restore ruff-format on test_target_codegen_c_host.py#20253
LngelKyo wants to merge 1 commit into
apache:mainfrom
LngelKyo:ci/restore-ruff-format-c-host

Conversation

@LngelKyo

@LngelKyo LngelKyo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

#20131 left a 3-line wrapped call in test_round (tests/python/codegen/test_target_codegen_c_host.py:200) that ruff-format rejoins into a single line under line-length = 100, so pre-commit run --all-files fails on every open PR — the CI lint is currently red on main, and this PR is the one-line restore.

-        midpoints = np.array(
-            [0.5, 1.5, 2.5, 3.5, -0.5, -1.5, -2.5, -3.5], dtype="float32"
-        )
+        midpoints = np.array([0.5, 1.5, 2.5, 3.5, -0.5, -1.5, -2.5, -3.5], dtype="float32")

Reproduce with the CI-pinned hook:

uvx ruff@0.12.3 format --check tests/python/codegen/test_target_codegen_c_host.py

Formatting-only; no other change. Once merged, #20252 (which rebases on this) goes green.

apache#20131 left a 3-line wrapped call in test_round that ruff-format
(line-length = 100) rejoins into one line, so pre-commit run
--all-files fails on every open PR. Reformat the line; no other
change. Reproduce with: uvx ruff@0.12.3 format --check
tests/python/codegen/test_target_codegen_c_host.py
@LngelKyo

LngelKyo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@tlopex @yongwww — one-line CI unblock; any committer can approve. This is the lint failure currently showing on #20252 and any other open PR.

@tlopex

tlopex commented Sep 1, 2026

Copy link
Copy Markdown
Member

Could you close this and fold this into #20252 ?

@LngelKyo

LngelKyo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing per @tlopex — folding the one-line restore into #20252.

@LngelKyo LngelKyo closed this Sep 1, 2026
@LngelKyo LngelKyo reopened this Sep 1, 2026
@LngelKyo

LngelKyo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Reopening: main is currently failing ruff format on this one file (from #20131), which blocks lint on every open PR — including #20249, which is approved with all seven other checks green. One line, verified with the CI-pinned ruff 0.12.3.

@LngelKyo

LngelKyo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing per @tlopex — folding back into #20252 (see #20252 (comment)).

@LngelKyo LngelKyo closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants