summaryrefslogtreecommitdiffstats
path: root/pre_commit_hooks/requirements_txt_fixer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-09 06:25:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-09 06:25:58 +0000
commitab5b91c265d1b7a1273e0a68fdf87b2ee1d7eb6a (patch)
tree8d5133377d8bf60dbfa05f25872aa6f51227a821 /pre_commit_hooks/requirements_txt_fixer.py
parentAdding upstream version 4.6.0+dfsg. (diff)
downloadpre-commit-hooks-upstream.tar.xz
pre-commit-hooks-upstream.zip
Adding upstream version 5.0.0+dfsg.upstream/5.0.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit_hooks/requirements_txt_fixer.py')
-rw-r--r--pre_commit_hooks/requirements_txt_fixer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pre_commit_hooks/requirements_txt_fixer.py b/pre_commit_hooks/requirements_txt_fixer.py
index 261acc9..07b57e1 100644
--- a/pre_commit_hooks/requirements_txt_fixer.py
+++ b/pre_commit_hooks/requirements_txt_fixer.py
@@ -115,7 +115,10 @@ def fix_requirements(f: IO[bytes]) -> int:
# which is automatically added by broken pip package under Debian
requirements = [
req for req in requirements
- if req.value != b'pkg-resources==0.0.0\n'
+ if req.value not in [
+ b'pkg-resources==0.0.0\n',
+ b'pkg_resources==0.0.0\n',
+ ]
]
# sort the requirements and remove duplicates