Bahtya
dfac6b321e
Fix requirements-txt-fixer reordering pip options like --index-url
...
The requirements-txt-fixer was alphabetically sorting all lines, including
pip options like --index-url and --extra-index-url. This caused
--extra-index-url to be sorted above --index-url, breaking pip's index
resolution order since --index-url must come first.
Fix by preserving the original relative order of lines that start with
`--` (pip options), while still sorting regular package requirements
alphabetically.
Closes #612
Bahtya
2026-04-10 00:13:44 +08:00
Eric L Frederich
eadcce2e03
Stop pkg_resources from being added as well
...
This package with an underscore instead of a dash seems to be
new behavior (at least on Ubuntu 20.04 with Python 3.8)
fixes #1030
2024-03-26 15:27:01 -04:00
Vincent Houlbrèque
0d6d0a79df
Remove duplicated packages
2024-02-25 12:15:29 -05:00
Anthony Sottile
8f6152921e
drop python3.6 support
...
python 3.6 reached end of life on 2021-12-23
Committed via https://github.com/asottile/all-repos
2022-01-15 19:24:05 -05:00
Viacheslav Greshilov
28b2c8e431
requirements-txt-fixer now supports indents before comments
2021-01-17 21:15:05 +02:00
Max Rozentsveyg
f35bfed79e
Don't use LocalPath.strpath
2020-05-20 12:08:42 -04:00
Max Rozentsveyg
7ebd420417
Parse more operators in requirements
2020-05-18 17:25:48 -04:00
Aniket Bhatnagar
bbcd31e000
Handled multiline dependencies
2020-05-08 07:10:54 -07:00
Vinay Karanam
189e33e48c
Fixed sorting for non editable requirement urls
2019-11-14 02:22:07 +05:30
Barak Y. Reif
d4b544daf3
alter file with new line even if no other content is changed
2019-09-28 21:59:41 +03:00
Barak Y. Reif
da2ea3f7a7
add new line post reading requirements file, change before from tuple to list, add test cases
2019-09-28 21:40:09 +03:00
Anthony Sottile
4575652bd2
Use default flake8 config
2019-02-11 19:56:15 -08:00
Anthony Sottile
030bfac7e4
Apply typing to all of pre-commit-hooks
2019-01-31 20:09:15 -08:00
Michał Sochoń
1d6ad0d6ed
Provide automatic removal of pkg-resources==0.0.0
...
Should help to deal with that pretty paintuly issue under Ubuntu/Debian
family:
https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
2018-03-25 23:34:02 +02:00
Anthony Sottile
86691eda47
Fix requirements-txt-fixer for comments at end of file
2017-10-09 10:59:17 -07:00
Anthony Sottile
2a902e0a07
Use asottile/add-trailing-comma
2017-07-12 18:58:30 -07:00
Daniel Gallagher
844d9830de
Some style tweaks
2017-06-25 10:14:58 -07:00
Daniel Gallagher
7ccfa05f2f
Fix NoneTypeError when requirements file is empty
2017-06-23 17:19:21 -07:00
Vinay Karanam
c58ae08fed
requirements fixer output is similar to pip freeze
2016-07-03 04:10:20 +05:30
Anthony Sottile
a99475afa0
Simplify the tests
2016-05-27 14:09:50 -07:00
Chris Kuehl
a1b0104f3d
Sort requirements.txt case-insensitively
2015-08-17 12:43:13 -07:00
Anthony Sottile
151d485a81
More naturally sort requirements.
2015-02-12 09:30:17 -08:00
Anthony Sottile
b08f834d65
Update pre-commit hooks
2015-01-04 16:05:54 -08:00
Anthony Sottile
2f1d2bbe5b
Remove @entry decorator (and misc cleanup)
2015-01-04 11:08:53 -08:00
Cameron Paul
b83ea591b5
Added requirements.txt hook
2014-12-16 12:39:03 -08:00