Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ repos:
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args: [ --py313-plus ]
Comment thread
Copilot marked this conversation as resolved.
Outdated

- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.80
hooks:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ This project uses [`uv`](https://docs.astral.sh/uv/) for dependency management
and [`pre-commit`](https://pre-commit.com/) to enforce code quality and
conventional commit messages.

`pyupgrade` runs as part of the pre-commit checks, so syntax modernization is
applied automatically for developers and enforced in CI on every pull request
and push.

After cloning the repository, set up the development environment and register
both pre-commit and commit-msg git hooks:

Expand All @@ -30,6 +34,12 @@ uv sync
uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
```

You can also run the hook on demand:

```bash
uv run pre-commit run pyupgrade --all-files
```

To execute the automated test suite and check code coverage:

```bash
Expand Down
10 changes: 10 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project uses [`uv`](https://docs.astral.sh/uv/) for dependency management
and [`pre-commit`](https://pre-commit.com/) to enforce code quality and
conventional commit messages.

`pyupgrade` is part of the pre-commit suite, which means modern syntax cleanup
runs locally for developers and is enforced again by CI on every pull request
and push.

## Setup

After cloning the repository, set up the development environment and register
Expand All @@ -14,6 +18,12 @@ uv sync
uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
```

To run only the syntax modernization hook on demand:

```bash
uv run pre-commit run pyupgrade --all-files
```

## Testing

To execute the automated test suite and check code coverage:
Expand Down
Loading