* Refine pre-commit hook stages and ruff
Add default_stages and explicitly set stages for hooks so checks that don't modify files can run in both pre-commit and manual/CI, while modifiers run only locally. Reorganize and document ruff hooks into local autofix/write entries (runs with --fix/unsafe-fixes and format write) and CI check-only entries (output-format=github, --check/--diff). Also set stages for pyproject-fmt and validate-pyproject, add check-* hooks to pre-commit/manual, and clarify behavior with inline comments.
* [lint apply] Add PR-only pre-commit workflow
Add .github/workflows/format.yml: a GitHub Actions workflow that runs pre-commit only for changed files in PRs. It triggers on pull_request (opened, synchronize, reopened), uses a detect_changes job to checkout full history and compute the list of files changed against the base branch, and exposes that list as an output. A precommit job (guarded by a condition that changed files exist) checks out the PR branch, sets up Python 3.12, installs pre-commit, and runs pre-commit only on the changed files.
* Run pre-commit on all files
Manual fixes:
- Reordered some __init__ calls and added some __all__
- Added tensorrt import best-effort in one file
- __init__.py ignores E402 due to requiring registry update
* Update format.yml
* Use multiline GITHUB_OUTPUT for changed files
Replace the single-line echo that wrote CHANGED_FILES to $GITHUB_OUTPUT with a here-document (key<<EOF ... EOF) to correctly export multi-line file lists. This preserves newlines and spaces in the changed-files output so downstream workflow steps receive the full list.
* Update format.yml
* Fix circular import
* Fix all E501
* Export Engine for public acccess
Add .github/workflows/format.yml
GitHub Actions workflow that runs pre-commit only for changed files in PRs.
It triggers on pull_request (opened, synchronize, reopened), uses a detect_changes job to checkout full history and compute the list of files changed against the base branch, and exposes that list as an output.
A precommit job (guarded by a condition that changed files exist) checks out the PR branch, sets up Python 3.12, installs pre-commit, and runs pre-commit only on the changed files.