mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
ci/lint: prek commit gateway (ruff check/format + basedpyright)
Add prek.toml so git commit runs ruff-pre-commit (fix then format) and pdm-based basedpyright. Document install/install-hook; clear type warnings that made basedpyright exit non-zero under recommended mode.
This commit is contained in:
@@ -71,7 +71,15 @@ pdm run basedpyright .
|
||||
pdm run pytest
|
||||
```
|
||||
|
||||
CI fails if sources are not Ruff-formatted (`ruff format --check`). Run `pdm run ruff format .` before push.
|
||||
**Commit gateway** ([prek](https://prek.j178.dev/)): runs ruff check + format and basedpyright on `git commit` so format is not forgotten.
|
||||
|
||||
```bash
|
||||
uv tool install prek # once
|
||||
prek install # once per clone (installs .git/hooks/pre-commit)
|
||||
prek run --all-files # run all hooks on demand
|
||||
```
|
||||
|
||||
Config: `prek.toml`. CI still runs the same checks in GitHub Actions.
|
||||
|
||||
## Basic usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user