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
Anthony Sottile
a49f812a96
py39+
...
Committed via https://github.com/asottile/all-repos
2024-10-11 19:30:07 -04: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
Anthony Sottile
39ab2ed85e
replace exit(main()) with raise SystemExit(main())
...
Committed via https://github.com/asottile/all-repos
2021-10-23 13:23:50 -04:00
Viacheslav Greshilov
28b2c8e431
requirements-txt-fixer now supports indents before comments
2021-01-17 21:15:05 +02:00
Anthony Sottile
64d3fbd5cf
fix mypy by correcting the __lt__ annotation
2020-11-16 10:41:32 -08: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
Anthony Sottile
f5c42a050b
pre-commit-hooks: python3.6+
2020-02-05 11:22:18 -08:00
Vinay Karanam
189e33e48c
Fixed sorting for non editable requirement urls
2019-11-14 02:22:07 +05:30
Barak Y. Reif
e4cfaa6b68
remove redundent type annotation
2019-09-28 22:16:20 +03:00
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ń
980fc9bdc3
Fix flake8 error
...
Forgot to rename one var...
2018-03-26 00:41:21 +02:00
Michał Sochoń
b0d44c7084
Ensure not to alter list in 'for' loop
2018-03-26 00:17:13 +02:00
Michał Sochoń
9e28aaf275
Simplify check, extend README
2018-03-26 00:02:23 +02: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
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
Anthony Sottile
9cee71b5df
Add pyupgrade
2017-03-12 18:01:29 -07:00
Vinay Karanam
81bd74d9c3
coverage fix
2016-07-03 04:31:19 +05:30
Vinay Karanam
c58ae08fed
requirements fixer output is similar to pip freeze
2016-07-03 04:10:20 +05:30
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
Cameron Paul
f06dfdae7f
Print on requirements.txt failure
2015-01-12 13:03:11 -06: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