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

Default strict search to true if only strict fields are searched #56

Merged

Conversation

sarayourfriend
Copy link
Contributor

Not sure if this is what was meant by #45 but took a shot at it.

There's probably a better way of making sure that entities is only retrieved one time than what I went with 🤔

Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

I just tried this out and it works great! Although, it doesn't alter the state of the strict search checkbox. Do you think it would be a good idea to change name_lookup to return both the HTML and strict_search so that could be supplied to the rendered HTML for further lookups?

src/app.py Outdated Show resolved Hide resolved
src/dataset.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

Amazing work!!

src/dataset.py Outdated
Comment on lines 43 to 46
entities: typing.List[api_types.Entity],
strict_search: bool = None,
**kwargs,
) -> str:
) -> typing.Tuple[str, bool]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not important now, but just as a note for the future - I typically do from typing import <stuff> for the typing library to make it easier to type out 😄

@AetherUnbound AetherUnbound merged commit 685864b into main Jun 12, 2021
@AetherUnbound AetherUnbound deleted the add/default-to-strict-search-if-only-strict-fields branch June 12, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants