Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid the combination of unique and ignore case options in file_contents_sorter.py #826

Closed
wants to merge 2 commits into from

Conversation

renegaderyu
Copy link

Example output when both options are specified:

usage: file_contents_sorter.py [-h] [--ignore-case | --unique] filenames [filenames ...]
file_contents_sorter.py: error: argument --unique: not allowed with argument --ignore-case

Closes #794.

…ers comments in #794. Removes a test that is no longer valid now that this combination is no longer supported. Closes #794.
Comment on lines 68 to 71
if args.ignore_case and args.unique:
print('ERROR: usage of --unique and --ignore-case is unsupported. \
Please update your configuration.')
return FAIL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use backslashes like this -- also this is going to render very strangely

also this behaviour needs to be tested (capsys might help) -- but then again you can probably just make this use argparse's mutually exclusive options

@renegaderyu renegaderyu closed this by deleting the head repository Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

file-contents-sorter Not working same way everytime
2 participants