mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 03:06:54 +00:00
Simplify check, extend README
This commit is contained in:
parent
1d6ad0d6ed
commit
9e28aaf275
2 changed files with 5 additions and 4 deletions
|
|
@ -69,10 +69,11 @@ def fix_requirements(f):
|
|||
else:
|
||||
rest = []
|
||||
|
||||
# find and remove pkg-resources==0.0.0
|
||||
# which is automatically added by broken pip package under Debian
|
||||
for requirement in requirements:
|
||||
if b'pkg-resources' in requirement.name:
|
||||
if b'0.0.0' in requirement.value:
|
||||
requirements.remove(requirement)
|
||||
if requirement.value == b'pkg-resources==0.0.0\n':
|
||||
requirements.remove(requirement)
|
||||
|
||||
for requirement in sorted(requirements):
|
||||
after.extend(requirement.comments)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue