mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-07 20:26:54 +00:00
Remove duplicated elements
This commit is contained in:
parent
516a8a263c
commit
670f16c2f7
2 changed files with 4 additions and 1 deletions
|
|
@ -116,7 +116,8 @@ def fix_requirements(f: IO[bytes]) -> int:
|
|||
for requirement in sorted(requirements):
|
||||
after.extend(requirement.comments)
|
||||
assert requirement.value, requirement.value
|
||||
after.append(requirement.value)
|
||||
if requirement.value not in after:
|
||||
after.append(requirement.value)
|
||||
after.extend(rest)
|
||||
|
||||
after_string = b''.join(after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue