Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

[mod] searx.RawTextQuery: the constructor call parse_query #2185

Merged
merged 1 commit into from Sep 12, 2020

Conversation

dalf
Copy link
Contributor

@dalf dalf commented Sep 9, 2020

What does this PR do?

The RawTextQuery usage is:

  1. call the constructor
  2. call the parse_query() to actually parse the query.

git grep -A2 "RawTextQuery(" shows that all instantiations of the RawTextQuery class is followed by a call to the parse_query() method.

This PR:

  • rename RawTextQuery.parse_query to RawTextQuery._parse_query
  • RawTextQuery constructor call RawTextQuery._parse_query

Why is this change important?

Small modification to make the code readable.

How to test this PR locally?

  • make test
  • check that searx bang still works as expected.
  • check autocomplete still works as expected.

Author's checklist

Related issues

Related to #2143

return42
return42 previously approved these changes Sep 9, 2020
Copy link
Contributor

@return42 return42 left a comment

Choose a reason for hiding this comment

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

LGTM / thanks!

kvch
kvch previously approved these changes Sep 12, 2020
@dalf dalf dismissed stale reviews from kvch and return42 via df12ed6 September 12, 2020 13:27
@dalf dalf merged commit ae07f4a into searx:master Sep 12, 2020
@dalf dalf deleted the rawtextquery-auto-parse branch September 28, 2020 19:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants