question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`requirements-txt-fixer` ordering breaks using --index-url and --extra-index-url together in requirements.txt

See original GitHub issue

If you use both the --index-url and --extra-index-url flags together in a requirements.txt file the hook will put --extra-index-url above the --index-url which causes the url set to index-url be skipped. I suppose this is because the flags are also sorted alphabetically.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Jun 21, 2022

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

0reactions
renegaderyucommented, Oct 20, 2022

@asottile Apologies for not seeing the failing tests before asking. I think its ready now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip requirements.txt with alternative index - Stack Overflow
If I have multiple packages from the same repo, do I have to include index URL for each package, or does the place...
Read more >
Installing Python requirements with an extra index url hangs ...
This used to work, but now hangs when installing dependencies. I tried updating pip, and using pip3. I have modified the requirements.txt to...
Read more >
Dependency notation including the index URL - Packaging
I would say that if any code that require this mechanism, it is a sign that the code should not be distributed as...
Read more >
wellbore-domain-services - requirements_dev.txt - GitLab
This file is autogenerated by pip-compile with Python 3.8. 3. # by the following command: ... --extra-index-url ... -c requirements.txt.
Read more >
extra-index-url https://path/to/pypi/mirror : PY-36614
requirements.txt does not correctly handle version statements >= and == when using --extra-index-url https://path/to/pypi/mirror. Duplicates 1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found