Skip to content

Commit

Permalink
Stop installing pre-commit in dev
Browse files Browse the repository at this point in the history
It's not necessary thanks to tox & pre-commit ci and it's kinda overbearing
towards people who already have it installed.
  • Loading branch information
hynek committed Aug 11, 2022
1 parent 80c61b7 commit 0c19e16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ $ make html

The built documentation can then be found in `docs/_build/html/`.

To avoid committing code that violates our style guide, we strongly advise you to install [*pre-commit*] [^dev] hooks:
To avoid committing code that violates our style guide, we strongly advise you to install [*pre-commit*] and its hooks:

```console
$ pre-commit install
```

You can also run them anytime (as our *tox* does) using:
This is not strictly necessary, because our [*tox*] file contains an environment that runs:

```console
$ pre-commit run --all-files
```

[^dev]: *pre-commit* should have been installed into your virtualenv automatically when you ran `pip install -e '.[dev]'` above.
If *pre-commit* is missing, your probably need to run `pip install -e '.[dev]'` again.
and our CI has integration with `pre-commit.ci <https://pre-commit.ci>`_.
But it's way more comfortable to run it locally and *git* catching avoidable errors.


## Code
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"mypy>=0.971; python_implementation == 'CPython'",
"pytest-mypy-plugins; python_implementation == 'CPython'",
],
"tests": {
"tests": [
"attrs[tests-no-zope]",
"zope.interface",
},
"dev": {"attrs[tests,docs]": ["pre-commit"]},
],
"dev": ["attrs[tests,docs]"],
}
# Don't break Paul unnecessarily just yet. C.f. #685
EXTRAS_REQUIRE["tests_no_zope"] = EXTRAS_REQUIRE["tests-no-zope"]
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ commands =


[testenv:pre-commit]
basepython = python3.10
skip_install = true
deps = pre-commit
passenv = HOMEPATH # needed on Windows
Expand Down

0 comments on commit 0c19e16

Please sign in to comment.