-
Notifications
You must be signed in to change notification settings - Fork 13
Bugfix/search arg validation #93
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
Conversation
| logger.print_and_log_error(u"You cannot use --advanced-query with additional search args.") | ||
| exit(1) | ||
| def exit_if_advanced_query_used_with_other_search_args(args, search_arg_enum): | ||
| invalid_args = ["begin", "end", "incremental"] + list(search_arg_enum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we moved --format out of search_shared.create_search_args() (seems like it could easily be useful elsewhere), we could have invalid_args be set tosearch_shared.create_search_args() - ["advanced_query"]. This would keep invalid_args in sync if we need to add more search args in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just put all the incompatible args into their own function and used that to build the list.
|
@timabrmsn looks good, can you add tests that mock the result of |
No description provided.