-
-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requirements-txt-fixer
ordering breaks using --index-url and --extra-index-url together in requirements.txt
#612
Comments
note that a special case could be added, though my thought is that supporting something that shouldn't be used seems like unnecessary work |
@asottile I did not know about the security problems! Thank you for the link! |
Is there a pre-commit hook for detecting if the developer has incorrectly configured pip to run with I mean in addition to simply reading the requirements files, so it would also detect if the global pip config has been incorrectly configured? |
something like that doesn't really make sense as a hook -- looking at global settings doesn't make sense for something that's supposed to check source code plus you'd have to know to configure such a thing and at that point you might as well just turn off the bad setting -- it's not something you're going to "accidentally" commit one day |
@asottile Your insight is highly appreciated! |
@asottile please review if you have time. I'm hoping this PR is simple enough and goes with the spirit of the special case you mentioned. Also, I'd appreciate if you could label w/ |
I'm not going to review something which doesn't pass tests |
@asottile Apologies for not seeing the failing tests before asking. I think its ready now. |
If you use both the
--index-url
and--extra-index-url
flags together in arequirements.txt
file the hook will put--extra-index-url
above the--index-url
which causes the url set toindex-url
be skipped. I suppose this is because the flags are also sorted alphabetically.The text was updated successfully, but these errors were encountered: