Skip to content

Commit

Permalink
remove pre-commit (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham authored Mar 6, 2025
1 parent 397d506 commit 1e86479
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 160 deletions.
74 changes: 0 additions & 74 deletions .pre-commit-config.yaml

This file was deleted.

27 changes: 2 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,35 +183,12 @@ Now you can install the dev dependencies:
uv sync
```

### pre-commit

Optype uses [pre-commit](https://pre-commit.com/) to ensure that the code is
formatted and typed correctly when committing the changes.

```bash
uv run pre-commit install
```

> [!NOTE]
> Pre-commit doesn't run the (unit-) tests. This will be run by github actions
> when submitting a pull request. See the next section for more details.
### Testing

Optype uses [pytest](https://docs.pytest.org/en/stable/) for unit testing.
These tests can be run with

```bash
uv run pytest
```

### Tox

The pre-commit hooks and the tests can easily be run with
[tox](https://github.com/tox-dev/tox):
The linters and tests can easily be run with [tox](https://github.com/tox-dev/tox):

```bash
uv run tox -p all
uvx tox p
```

This will run the tests in parallel on all supported Python versions.
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
src="https://github.com/jorenham/optype/workflows/CI/badge.svg"
/>
</a>
<a href="https://github.com/pre-commit/pre-commit">
<img
alt="optype - pre-commit"
src="https://img.shields.io/badge/pre--commit-enabled-orange?logo=pre-commit"
/>
</a>
<a href="https://github.com/KotlinIsland/basedmypy">
<img
alt="optype - basedmypy"
Expand Down
12 changes: 2 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ dev = [
{include-group = "lint"},
{include-group = "type"},
{include-group = "test"},
"pre-commit>=4.1.0",
"tox>=4.24.1",
]

Expand All @@ -78,7 +77,6 @@ exclude = [
".editorconfig",
".gitignore",
".markdownlint.yaml",
".pre-commit-config.yaml",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"SECURITY.md",
Expand Down Expand Up @@ -167,6 +165,7 @@ xfail_strict = true
[tool.repo-review]
ignore = [
"PY004", # no `docs/` (maybe later)
"PY006", # no pre-commit
"PC140", # basedmypy > mypy
"PC170", # no sphinx
"PC180", # no css or js
Expand Down Expand Up @@ -350,7 +349,7 @@ force-exclude = true

[tool.tox]
isolated_build = true
env_list = ["repo-review", "pre-commit", "3.10", "3.11", "3.12", "3.13"]
env_list = ["repo-review", "3.10", "3.11", "3.12", "3.13"]

[tool.tox.env_run_base]
description = "test with {base_python}"
Expand All @@ -359,13 +358,6 @@ env_list = ["repo-review", "pre-commit", "3.10", "3.11", "3.12", "3.13"]
commands_pre = [["uv", "sync", "--frozen"]]
commands = [["uv", "run", "pytest"]]

[tool.tox.env.pre-commit]
description = "pre-commit"
skip_install = true
allowlist_externals = ["uv"]
commands_pre = [["uv", "sync", "--frozen"]]
commands = [["uv", "run", "pre-commit", "run", "--all-files"]]

[tool.tox.env.repo-review]
description = "repo-review"
skip_install = true
Expand Down
47 changes: 2 additions & 45 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e86479

Please sign in to comment.