Skip to content

Commit 2f0604b

Browse files
authored
only install pre-commit deps; not all dev
1 parent cf4865a commit 2f0604b

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

noxfile.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,29 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
149149
@session(name="pre-commit", python=python_versions[0])
150150
def precommit(session: Session) -> None:
151151
"""Lint using pre-commit."""
152-
session_install_uv(session, install_dev=True)
153152
args = session.posargs or [
154153
"run",
155154
"--all-files",
156155
"--hook-stage=manual",
157156
"--show-diff-on-failure",
158157
]
159-
session_install_uv_package(session, ["pre-commit"])
158+
session_install_uv_package(
159+
session,
160+
[
161+
"black",
162+
"darglint",
163+
"flake8",
164+
"flake8-bandit",
165+
"flake8-bugbear",
166+
"flake8-docstrings",
167+
"flake8-rst-docstrings",
168+
"isort",
169+
"pep8-naming",
170+
"pre-commit",
171+
"pre-commit-hooks",
172+
"pyupgrade",
173+
]
174+
)
160175
session.run("pre-commit", *args)
161176
if args and args[0] == "install":
162177
activate_virtualenv_in_precommit_hooks(session)

0 commit comments

Comments
 (0)