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

Fix bug where --max-results could not be set with --no-context-annota… #648

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion twarc/command2.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def _validate_max_results(context, parameter, value):
)
if value < 10 or value > 500:
raise click.BadParameter("--max-results must be between 10 and 500")
if value > 100 and has_context_annotations:
if value > 100 and (has_context_annotations and not no_context_annotations_set):
raise click.BadParameter(
"--max-results cannot be greater than 100 when using context annotations. Set --no-context-annotations to remove them, or don't specify them in --tweet-fields."
)
Expand Down