fix(deps): move pre-commit from core to dev dependencies #1624
+248
−182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Version Conflicts: Move pre-commit to Development Dependencies
Description
This PR resolves version conflicts in the instructor project by moving
pre-commit>=4.2.0
from core dependencies to development dependencies where it belongs.Problem
The
pre-commit>=4.2.0
package was incorrectly listed as a core dependency inpyproject.toml
, which meant that development tools were being installed in production environments. This can cause version conflicts and unnecessary bloat in production deployments.Solution
pre-commit>=4.2.0
from the coredependencies
listpre-commit>=4.2.0
to both:[project.optional-dependencies].dev
[dependency-groups].dev
This ensures consistency between both dependency specification methods used in the project while properly categorizing pre-commit as a development-only dependency.
Changes
pyproject.toml
:"pre-commit>=4.2.0"
from core dependencies (line 17)"pre-commit>=4.2.0"
to[project.optional-dependencies].dev
"pre-commit>=4.2.0"
to[dependency-groups].dev
Testing
uv sync
uv sync --group dev
python -c "import instructor"
uv run ruff check .
Impact
Link to Devin run: https://app.devin.ai/sessions/c236f82acdb4459a8691ed87207f9662
Requested by: Jason Liu (work@jxnl.co)