File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ Add this to your `.pre-commit-config.yaml`
9090 - ` --indent ... ` - Control the indentation (either a number for a number of spaces or a string of whitespace). Defaults to 4 spaces.
9191 - ` --no-sort-keys ` - when autofixing, retain the original key ordering (instead of sorting the keys)
9292 - ` --top-keys comma,separated,keys ` - Keys to keep at the top of mappings.
93- - ` requirements-txt-fixer ` - Sorts entries in requirements.txt
93+ - ` requirements-txt-fixer ` - Sorts entries in requirements.txt and removes incorrect entry for ` pkg-resources==0.0.0 `
9494- ` sort-simple-yaml ` - Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks.
9595- ` trailing-whitespace ` - Trims trailing whitespace.
9696 - Markdown linebreak trailing spaces preserved for ` .md ` and` .markdown ` ;
Original file line number Diff line number Diff line change @@ -69,10 +69,11 @@ def fix_requirements(f):
6969 else :
7070 rest = []
7171
72+ # find and remove pkg-resources==0.0.0
73+ # which is automatically added by broken pip package under Debian
7274 for requirement in requirements :
73- if b'pkg-resources' in requirement .name :
74- if b'0.0.0' in requirement .value :
75- requirements .remove (requirement )
75+ if requirement .value == b'pkg-resources==0.0.0\n ' :
76+ requirements .remove (requirement )
7677
7778 for requirement in sorted (requirements ):
7879 after .extend (requirement .comments )
You can’t perform that action at this time.
0 commit comments