mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-05-15 05:30:33 +00:00
Fix requirements-txt-fixer ordering for index URLs
This commit is contained in:
parent
f1dff44d3a
commit
b3286e6e19
2 changed files with 20 additions and 1 deletions
|
|
@ -107,6 +107,16 @@ from pre_commit_hooks.requirements_txt_fixer import Requirement
|
|||
PASS,
|
||||
b'a=2.0.0 \\\n --hash=sha256:abcd\nb==1.0.0\n',
|
||||
),
|
||||
|
||||
(
|
||||
b'--extra-index-url https://example-extra/simple\n'
|
||||
b'--index-url https://example-main/simple\n'
|
||||
b'requests==2.31.0\n',
|
||||
FAIL,
|
||||
b'--index-url https://example-main/simple\n'
|
||||
b'--extra-index-url https://example-extra/simple\n'
|
||||
b'requests==2.31.0\n',
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_integration(input_s, expected_retval, output, tmpdir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue