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

Avoid IndexError when passing an empty string to is_prefixed_with_dollar_sign #712

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

sindrig
Copy link
Contributor

@sindrig sindrig commented Sep 4, 2023

  • Tests for the changes have been added
  • Docs have been added / updated
  • All CI checks are green
  • What kind of change does this PR introduce?

As shown by the test, we want to return False for the empty string when checking if it is prefixed with a dollar.

  • What is the current behavior?

The function is_prefixed_with_dollar_sign raises IndexError when called with the empty string.

  • What is the new behavior (if this is a feature change)?

is_prefixed_with_dollar_sign returns False for the empty string.

As shown by the test, we want to return False for the empty string
when checking if it is prefixed with a dollar.
@lorenzodb1
Copy link
Member

@sindrig thank you for your contribution 😄 could you please merge master into your branch?

@sindrig
Copy link
Contributor Author

sindrig commented Nov 16, 2023

@sindrig thank you for your contribution 😄 could you please merge master into your branch?

Done ✔️

@lorenzodb1
Copy link
Member

@sindrig thank you for that! Looks like one of the pre-commit checks is failing. Please, run make test and then push the changes

@sindrig
Copy link
Contributor Author

sindrig commented Nov 20, 2023

@sindrig thank you for that! Looks like one of the pre-commit checks is failing. Please, run make test and then push the changes

Import order got mixed up. Fixed ✅

@lorenzodb1 lorenzodb1 changed the title Catch index error when checking dollar prefix Avoid IndexError when passing an empty string to is_prefixed_with_dollar_sign Dec 18, 2023
@lorenzodb1 lorenzodb1 merged commit 051af69 into Yelp:master Dec 18, 2023
12 checks passed
@lorenzodb1
Copy link
Member

@sindrig Thank you for your contribution! I went ahead and merged your changes. Really appreciate your work and hope to see another PR of yours soon 😄

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.

None yet

2 participants