lint
ray-project/ray/.claude/skills/lint/SKILL.md
Run linting and formatting checks on Ray code
Skill44k starsChanged 5 months ago
- Installs packages
What's in it
- Lint Modified Files
- Handling remaining errors
- Exclusions
- Reference
---
name: lint
description: Run linting and formatting checks on Ray code
---
# Lint Modified Files
Run pre-commit on the files you changed:
```bash
pre-commit run --files $(git diff --name-only HEAD)
```
`pre-commit run` without `--files` only operates on staged files, so pass the
modified file list explicitly.
If pre-commit is not installed:
```bash
pip install -c python/requirements_compiled.txt pre-commit && pre-commit install
```
## Handling remaining errors
Pre-commit auto-fixes simple issues (formatting, long lines, unused imports).
Review any remaining errors — these typically need code changes such as adding a
missing import, resolving a name conflict, or restructuring logic. Fix them by
editing the source code directly.
Use `# noqa` only for false positives that cannot be resolved by changing the code,
and include the rule code and reason: `# noqa: E501 — URL cannot be split`.
## Exclusions
pyproject.toml lists files in `per-file-ignores` and `extend-exclude`. When the PR
modifies a file that is on one of these lists, fix the lint issues in your changes
and consider removing the file from the list. Leave exclusion entries for files
outside the PR scope untouched.
## Reference
- Hook config: .pre-commit-config.yaml
- Ruff config: pyproject.toml (`[tool.ruff]` section)
- Docs: doc/source/ray-contribute/development.md ("Development tooling")
More agent context in ray-project/ray
7 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Skill
- backport-docs.claude/skills/backport-docs/SKILL.md
- fetch-buildkite-logs.claude/skills/fetch-buildkite-logs/SKILL.md
- ray-dependencies.claude/skills/ray-dependencies/SKILL.md
- rebuild.claude/skills/rebuild/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

