Skip to content

Add arange to extend-words, don't autofix typos#1259

Merged
shi-eric merged 1 commit into
newton-physics:mainfrom
shi-eric:ershi/update-typos-config
Dec 16, 2025
Merged

Add arange to extend-words, don't autofix typos#1259
shi-eric merged 1 commit into
newton-physics:mainfrom
shi-eric:ershi/update-typos-config

Conversation

@shi-eric

@shi-eric shi-eric commented Dec 16, 2025

Copy link
Copy Markdown
Member

Description

  • Update the pre-commit hook so that typos are not automatically fixed by typos
  • Add arange to the [tool.typos.default.extend-words] section in pyproject.toml

Closes #1249

Newton Migration Guide

Please ensure the migration guide for warp.sim users is up-to-date with the changes made in this PR.

  • The migration guide in docs/migration.rst is up-to date

Before your PR is "Ready for review"

  • Necessary tests have been added and new examples are tested (see newton/tests/test_examples.py)
  • Documentation is up-to-date
  • Code passes formatting and linting checks with pre-commit run -a

Summary by CodeRabbit

  • Chores
    • Updated spell-checking tool configuration to refine dictionary settings and ensure consistent hook configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Eric Shi <ershi@nvidia.com>
@coderabbitai

coderabbitai Bot commented Dec 16, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The changes update typos pre-commit hook configuration to recognize arange as a valid word, preventing false positives when flagging wp.tile_arange(). An explicit empty arguments array is also added to the hook configuration in .pre-commit-config.yaml.

Changes

Cohort / File(s) Change Summary
Typos Configuration
.pre-commit-config.yaml, pyproject.toml
Adds explicit empty args array to typos hook; extends typos dictionary with arange = "arange" to recognize the function name as a valid word

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

These are straightforward configuration changes with no logic or functional complexity. Both modifications are minimal and localized to pre-commit and project configuration files.

Possibly related PRs

Suggested reviewers

  • eric-heiden

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding 'arange' to extend-words and disabling autofix for typos.
Linked Issues check ✅ Passed The PR addresses issue #1249 by adding 'arange' to extend-words to prevent false typo detection and disabling autofix.
Out of Scope Changes check ✅ Passed All changes directly address the linked issue: adding 'arange' to typos dictionary and configuring typos hook to not autofix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a9dcba and 6ef673e.

📒 Files selected for processing (2)
  • .pre-commit-config.yaml (1 hunks)
  • pyproject.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run GPU Tests / Run GPU Unit Tests on AWS EC2
  • GitHub Check: Run GPU Benchmarks / Run GPU Benchmarks on AWS EC2
🔇 Additional comments (2)
.pre-commit-config.yaml (1)

33-33: This change correctly disables auto-fix behavior.

The typos pre-commit hook defaults to auto-fixing typos. Adding explicit args: [] overrides the default behavior to make the hook report findings only, without modifying files. The PR description is accurate, and the AI summary's claim of "no new behavior" is incorrect—this is a meaningful behavioral change.

pyproject.toml (1)

216-216: LGTM! Whitelisting arange correctly resolves the false positive.

The entry correctly marks arange as always valid by using the format where the correction equals the key, preventing the tool from flagging wp.tile_arange() as a typo. The format is consistent with existing entries in the same section (ba, HAA).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Dec 16, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@shi-eric shi-eric added this pull request to the merge queue Dec 16, 2025
Merged via the queue into newton-physics:main with commit 15a28e9 Dec 16, 2025
20 checks passed
@shi-eric shi-eric deleted the ershi/update-typos-config branch December 19, 2025 16:17
eric-heiden pushed a commit to eric-heiden/newton that referenced this pull request Jan 28, 2026
…#1259)

Signed-off-by: Eric Shi <ershi@nvidia.com>
mmacklin pushed a commit to mmacklin/newton that referenced this pull request Apr 7, 2026
…#1259)

Signed-off-by: Eric Shi <ershi@nvidia.com>
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.

Why does pre-commit run -a identify typos in wp.tile_arange() and insists on changing it to wp.tile_arrange()?

2 participants