mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Fix requirements-txt-fixer for comments at end of file
This commit is contained in:
parent
5d08e77ad5
commit
86691eda47
2 changed files with 9 additions and 0 deletions
|
|
@ -11,6 +11,8 @@ from pre_commit_hooks.requirements_txt_fixer import Requirement
|
|||
(
|
||||
(b'', PASS, b''),
|
||||
(b'\n', PASS, b'\n'),
|
||||
(b'# intentionally empty\n', PASS, b'# intentionally empty\n'),
|
||||
(b'foo\n# comment at end\n', PASS, b'foo\n# comment at end\n'),
|
||||
(b'foo\nbar\n', FAIL, b'bar\nfoo\n'),
|
||||
(b'bar\nfoo\n', PASS, b'bar\nfoo\n'),
|
||||
(b'#comment1\nfoo\n#comment2\nbar\n', FAIL, b'#comment2\nbar\n#comment1\nfoo\n'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue