Forbid the combination of unique and ignore case options per maintainers comments in #794. Removes a test that is no longer valid now that this combination is no longer supported. Closes #794.

This commit is contained in:
Ryan Miguel 2022-10-18 23:16:57 -07:00
parent 4dcb74a498
commit 3d305e15ef
2 changed files with 5 additions and 6 deletions

View file

@ -65,6 +65,11 @@ def main(argv: Sequence[str] | None = None) -> int:
)
args = parser.parse_args(argv)
if args.ignore_case and args.unique:
print('ERROR: usage of --unique and --ignore-case is unsupported. \
Please update your configuration.')
return FAIL
retv = PASS
for arg in args.filenames:

View file

@ -68,12 +68,6 @@ from pre_commit_hooks.file_contents_sorter import PASS
(
b'fee\nFie\nFoe\nfum\n',
['--unique', '--ignore-case'],
PASS,
b'fee\nFie\nFoe\nfum\n',
),
(
b'fee\nfee\nFie\nFoe\nfum\n',
['--unique', '--ignore-case'],
FAIL,
b'fee\nFie\nFoe\nfum\n',
),