Skip to content

Run ruff check and format on models/ with the same rules as python/ - #336

Merged
tjia1818 merged 2 commits into
apple:mainfrom
tjia1818:tao/ruff-models
Oct 9, 2026
Merged

tjia1818 merged 2 commits into
apple:mainfrom
tjia1818:tao/ruff-models

Conversation

@tjia1818

@tjia1818 tjia1818 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

models/ had no ruff config, so ruff used its defaults there (88 columns and a smaller rule set) and CI never looked at it. Add models/ruff.toml that extends python/pyproject.toml, add models/ to the CI lint job, and bring the existing export scripts in line:

  • format with the shared 100-column limit
  • apply the autofixes (Optional[X] -> X | None, import order)
  • wrap the over-long model description and --include-debug-info help strings; string values are unchanged

models/ had no ruff config, so ruff used its defaults there (88 columns
and a smaller rule set) and CI never looked at it. Add models/ruff.toml
that extends python/pyproject.toml, add models/ to the CI lint job, and
bring the existing export scripts in line:

- format with the shared 100-column limit
- apply the autofixes (Optional[X] -> X | None, import order)
- wrap the over-long model description and --include-debug-info help
  strings; string values are unchanged

@kevchengcodes kevchengcodes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding this!

@tjia1818
tjia1818 merged commit 9e97fd2 into apple:main Oct 9, 2026
3 checks passed
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.

4 participants