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

Match to USA if no exchange suffix is present #1939

Merged

Conversation

stkerr
Copy link
Contributor

@stkerr stkerr commented Jun 13, 2022

Description

This PR enables filtering stock searches by US based exchanges.

The logic on line 213 defaults to USA if there is no exchange symbol present, so the market coverage suffix should use the same logic. This enables filtering by exchange to work correctly.

Without this PR:
image

With this PR:
image

How has this been tested?

I tried several stocks search <ticker> -e USA commands.

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

The logic on line 213 defaults to USA if there is no exchange symbol present, so the market coverage suffix should use the same logic. This enables filtering by exchange to work correctly.
@stkerr stkerr marked this pull request as ready for review June 13, 2022 14:28
@stkerr
Copy link
Contributor Author

stkerr commented Jun 13, 2022

@DidierRLopes @jmaslek can you review and merge? Thanks!

Copy link
Collaborator

@DidierRLopes DidierRLopes left a comment

Choose a reason for hiding this comment

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

⚡ speeeeeed.

Thank youuu

@DidierRLopes DidierRLopes added the bug Fix bug label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants