style: add whitespace - #15394
Merged
Merged
style: add whitespace#15394
Conversation
…skewness` tests Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VH6Gk9z9xEyB6DyiJAj9x2
…gcdf` tests Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VH6Gk9z9xEyB6DyiJAj9x2
…l/mean` tests Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VH6Gk9z9xEyB6DyiJAj9x2
…r/quantile` tests Ref: #11352 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VH6Gk9z9xEyB6DyiJAj9x2
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fixes for commits merged to
developbetween 2026-09-20 23:56:55 -0700 (32b82d9f2) and 2026-09-21 01:04:16 -0700 (1a20e0293).Description
This pull request:
isAlmostSameValueassertions introduced by four of the ULP-migration commits in that window.docs/style-guides/javascript/README.md("Rule: Include spaces around array indices") requiresexpected[ i ]; these four commits wroteexpected[i]. Commit48f3eda37applied exactly this fix tomath/base/special/roundnfin the same window, so this is the same cleanup carried across the packages it missed.Fixes, grouped by package (22 occurrences, 10 files, one commit per package):
stats/base/dists/bradford/skewnessf6cb35602swapped inisAlmostSameValuebut wroteexpected[i]instead ofexpected[ i ]instats/base/dists/bradford/skewness/test/test.js:78andtest.native.js:87; fixed the spacing per the style guide, tolerance (36250 ULP) unchanged.stats/base/dists/cauchy/logcdfstats/base/dists/cauchy/logcdf/test/test.logcdf.js,test.factory.js, andtest.native.js(5415582c2):expected[i]->expected[ i ]per our array-index style rule; same drive-by we did inmath/base/special/roundnf(48f3eda37) the same day. No changes to the ULP tolerances.stats/base/dists/halfnormal/meanexpected[i]→expected[ i ]instats/base/dists/halfnormal/mean/test/test.js(L75) andtest.native.js(L80), missed in48ecece37per the array-index spacing rule; ULP tolerance untouched. Same fix landed inmath/base/special/roundnfvia48f3eda37.stats/base/dists/triangular/quantilestats/base/dists/triangular/quantile(dfbd4c5c8): theisAlmostSameValueassertions intest.quantile.js,test.factory.js, andtest.native.jsusedexpected[i]instead ofexpected[ i ], violating the array-index spacing rule; fixed all nine occurrences, no change to ULP tolerance.Related Issues
No. The originating commits reference #11352 (ULP-based assertion migration); this is follow-up cleanup only.
Questions
The
expected[i]form appears roughly 340 times repo-wide in tests migrated before this window. This PR deliberately touches only the lines introduced in the 2026-09-20/21 window rather than doing a repo-wide sweep. Say the word if you'd rather have the sweep as a separate PR.Other
Window audited. 27 commits, 60 files, +380/−829. 19 of the commits are the
test: migrate ... to ULP-based assertionseffort (#11352); the outliers arefloat16support inndarray/ones(46f04ebe0), a BLAS benchmark require-path normalization (4eff2519e), thendarray/nans-likedoc fix (71758bb36),roundnfspacing (48f3eda37), a git note (f23042f13), and a bot equation-URL refresh (32b82d9f2).Validation. Four independent reviewers ran over the window: two for style-guide compliance against established reference packages, two for bugs. Checks that came back clean and produced no changes here:
isnanbranch instats/incr/mgmean— safe, since@stdlib/assert/is-almost-same-valueimplements SameValue andNaNcompares equal toNaN. Thenullguards ingumbel/entropy,lognormal/skewness, andincr/nankurtosiswere all retained.bradford's 36250 is the measured max ULP difference over its 1000-point fixture.ndarray/onesfloat16 — the newbenchmark.size.float16.jsis byte-identical tobenchmark.size.float32.jsapart from the dtype and label, the.d.tsoverload sits in the same position as inndarray/zeros, and the new tests exercise both orders.ndarrayfromlib/ndarray.jsviasetReadOnly, sorequire( './../lib/ndarray.js' )is the identical function object.delta/tol/EPSreferences, or syntax errors in any changed file.Deliberately excluded. Anything needing interpretation: per-assertion ULP constants (the migration's whole point is that these are chosen per function), removal of the verbose interpolated failure messages in favor of
'returns expected value', and the pre-existingexpected[i]occurrences outside this window's diff.Not executed. The repository has no installed dev dependencies in this environment, so the tape suites were not run here. The changes are whitespace-only inside an argument expression and every modified file passes
node --check.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was produced by Claude Code running as a scheduled daily review of commits merged to
develop. It enumerated the 24-hour commit window, dispatched four independent reviewer agents (two for style-guide compliance, two for bugs), cross-checked and filtered their findings, and applied the surviving ones. Every change here is whitespace-only and was re-read against the proposed fix before committing. Opened as a draft for human audit before promotion.@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_01VH6Gk9z9xEyB6DyiJAj9x2
Generated by Claude Code