Skip to content

Commit 194e7bf

Browse files
committed
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
1 parent f71fa2c commit 194e7bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pre_commit_hooks/requirements_txt_fixer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ def fix_requirements(f: IO[bytes]) -> int:
110110
# which is automatically added by broken pip package under Debian
111111
requirements = [
112112
req for req in requirements
113-
if req.value != b'pkg-resources==0.0.0\n'
113+
if req.value not in [
114+
b'pkg-resources==0.0.0\n',
115+
b'pkg_resources==0.0.0\n',
116+
]
114117
]
115118

116119
for requirement in sorted(requirements):

0 commit comments

Comments
 (0)