You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently "jupyter-nb-clear-output", "pylint", "mypy" (see also #531), "sphinx-build", and "pytest" pre-commit hooks assume that a Python environment with numerous Python executables is activated. It causes two sorts of problems: 1) CI and local versions of packages may be different, making runs inconsistent, and 2) in some cases, it is tricky to have the right environment active when git commit is being run, e.g., in an IDE, or when using uv-based setup without an active environment (i.e., via uv run pytest instead of python -m pytest, etc.).
It is a multi-factor problem, and maybe a solution is excluding some slow and environment-dependent hooks, such as pytest and sphinx-build, entirely, while switching to pre-commit-controlled environments for things like jupyter-nb-clear-output, pylint, and mypy.
This is based on observations of the problems people have in the team and external users: a lot of people do not run pre-commit because it is slow, or because of mypy's inconsistent behavior, or because they didn't install Sphinx dependencies and sphinx-build fails even if they haven't touched any code or documentation.
Just to add a little to this, the discussion points were roughly:
A user who is not working on documentation probably doesn't need to build the docs locally before committing code
A user who IS working on documentation, is probably frequently (re)building the docs as they go, and wouldn't benefit much from building again with pre-commit before commiting code.
Activity
delucchi-cmu commentedon Nov 21, 2025
Based on in-person discussion, we should just remove the sphinx build from pre-commits entirely.
drewoldag commentedon Nov 24, 2025
Just to add a little to this, the discussion points were roughly: