Skip to content

chore: remove unnecessary format calls - #14520

Merged
kgryte merged 1 commit into
developfrom
philipp/fix-useless-format
Aug 22, 2026
Merged

chore: remove unnecessary format calls#14520
kgryte merged 1 commit into
developfrom
philipp/fix-useless-format

Conversation

@Planeshifter

@Planeshifter Planeshifter commented Aug 22, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • replaces calls to format where the format string contains no placeholders with the string literal directly, as the format function returns the input string unchanged in these cases.
  • removes the now-unused format require in two files where no other format calls remain.

These changes were auto-fixed by the no-useless-format ESLint rule proposed in #14519.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request?

37 files across array, blas, ndarray, and stats packages. Each change is a mechanical replacement of format( 'static string' ) with 'static string'.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was written by Claude Code under my direction and instructions. Changes are auto-fixes from the no-useless-format ESLint rule.


@stdlib-js/reviewers

Replace calls to `format` where the format string contains no
placeholders with the string literal directly, as the format
function returns the input string unchanged in these cases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@Planeshifter Planeshifter changed the title refactor: remove useless format calls chore: remove useless format calls Aug 22, 2026
@Planeshifter
Planeshifter marked this pull request as ready for review August 22, 2026 06:18
@Planeshifter
Planeshifter requested review from a team and kgryte August 22, 2026 06:18
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 22, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
array/mskfilter $\\color{green}123/123$
$\\color{green}+100.00\\%$
$\\color{green}11/11$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}123/123$
$\\color{green}+100.00\\%$
array/mskreject $\\color{green}123/123$
$\\color{green}+100.00\\%$
$\\color{green}11/11$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}123/123$
$\\color{green}+100.00\\%$
array/struct-factory $\\color{red}328/829$
$\\color{green}+39.57\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{red}0/3$
$\\color{green}+0.00\\%$
$\\color{red}328/829$
$\\color{green}+39.57\\%$
array/to-fancy $\\color{green}2228/2228$
$\\color{green}+100.00\\%$
$\\color{red}264/268$
$\\color{green}+98.51\\%$
$\\color{green}41/41$
$\\color{green}+100.00\\%$
$\\color{green}2228/2228$
$\\color{green}+100.00\\%$
blas/ddot $\\color{green}210/210$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}210/210$
$\\color{green}+100.00\\%$
blas/ext/cusum $\\color{green}497/497$
$\\color{green}+100.00\\%$
$\\color{green}55/55$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}497/497$
$\\color{green}+100.00\\%$
blas/sdot $\\color{green}210/210$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}210/210$
$\\color{green}+100.00\\%$
blas/tools/swap-factory $\\color{green}244/244$
$\\color{green}+100.00\\%$
$\\color{red}33/34$
$\\color{green}+97.06\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}244/244$
$\\color{green}+100.00\\%$
ndarray/base/binary-reduce-strided1d-dispatch $\\color{red}359/727$
$\\color{green}+49.38\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}0/4$
$\\color{green}+0.00\\%$
$\\color{red}359/727$
$\\color{green}+49.38\\%$
ndarray/base/every $\\color{red}12002/12006$
$\\color{green}+99.97\\%$
$\\color{red}1463/1465$
$\\color{green}+99.86\\%$
$\\color{green}64/64$
$\\color{green}+100.00\\%$
$\\color{red}12002/12006$
$\\color{green}+99.97\\%$
ndarray/base/nullary $\\color{green}8421/8421$
$\\color{green}+100.00\\%$
$\\color{green}670/670$
$\\color{green}+100.00\\%$
$\\color{green}43/43$
$\\color{green}+100.00\\%$
$\\color{green}8421/8421$
$\\color{green}+100.00\\%$
ndarray/base/nullary-strided1d-dispatch $\\color{red}280/433$
$\\color{green}+64.67\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}0/3$
$\\color{green}+0.00\\%$
$\\color{red}280/433$
$\\color{green}+64.67\\%$
ndarray/base/unary-reduce-strided1d-dispatch $\\color{red}348/643$
$\\color{green}+54.12\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}0/4$
$\\color{green}+0.00\\%$
$\\color{red}348/643$
$\\color{green}+54.12\\%$
ndarray/base/unary-reduce-strided1d-dispatch-by $\\color{red}370/732$
$\\color{green}+50.55\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}0/4$
$\\color{green}+0.00\\%$
$\\color{red}370/732$
$\\color{green}+50.55\\%$
ndarray/base/unary-strided1d-dispatch $\\color{red}350/633$
$\\color{green}+55.29\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}0/4$
$\\color{green}+0.00\\%$
$\\color{red}350/633$
$\\color{green}+55.29\\%$
ndarray/iter/column-entries $\\color{green}290/290$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}290/290$
$\\color{green}+100.00\\%$
ndarray/iter/columns $\\color{green}285/285$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}285/285$
$\\color{green}+100.00\\%$
ndarray/iter/matrices $\\color{green}274/274$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}274/274$
$\\color{green}+100.00\\%$
ndarray/iter/matrix-entries $\\color{green}291/291$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}291/291$
$\\color{green}+100.00\\%$
ndarray/iter/row-entries $\\color{green}290/290$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}290/290$
$\\color{green}+100.00\\%$
ndarray/iter/rows $\\color{green}285/285$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}285/285$
$\\color{green}+100.00\\%$
ndarray/iter/select-dimension $\\color{green}282/282$
$\\color{green}+100.00\\%$
$\\color{green}34/34$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}282/282$
$\\color{green}+100.00\\%$
ndarray/iter/stacks $\\color{green}317/317$
$\\color{green}+100.00\\%$
$\\color{green}46/46$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}317/317$
$\\color{green}+100.00\\%$
ndarray/iter/subarrays $\\color{green}283/283$
$\\color{green}+100.00\\%$
$\\color{green}33/33$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}283/283$
$\\color{green}+100.00\\%$
ndarray/to-fancy $\\color{red}2467/3240$
$\\color{green}+76.14\\%$
$\\color{red}55/56$
$\\color{green}+98.21\\%$
$\\color{red}3/53$
$\\color{green}+5.66\\%$
$\\color{red}2467/3240$
$\\color{green}+76.14\\%$
stats/array/mskmax $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/mskmaxabs $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/mskmidrange $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/mskmin $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/mskminabs $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/mskrange $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/nanmskmax $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/nanmskmidrange $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/nanmskmin $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$
stats/array/nanmskrange $\\color{green}127/127$
$\\color{green}+100.00\\%$
$\\color{green}15/15$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}127/127$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte changed the title chore: remove useless format calls chore: remove unnecessary format calls Aug 22, 2026
@kgryte
kgryte merged commit fdbc822 into develop Aug 22, 2026
43 checks passed
@kgryte
kgryte deleted the philipp/fix-useless-format branch August 22, 2026 07:57
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 22, 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.

3 participants