ITADN

fix(requirements-txt-fixer): keep --index-url before --extra-index-url

#1241Pull RequestLouisLau-art 创建于 2026-02-05
L
LouisLau-artcommented
Fixes pre-commit/pre-commit-hooks#612. `requirements-txt-fixer` sorts entries by name, which causes `--extra-index-url` to be placed before `--index-url`. Pip processes these options in order, and this ordering can change behavior. This adds a small sort special-case so `--index-url` is always ordered before `--extra-index-url`, and includes a regression test. Test plan: - `python -m pytest -q tests/requirements_txt_fixer_test.py`
合并状态:未合并 关闭于 2026-03-01 3 条评论