Skip to content

Added value checks for "rect" and "roundrect" #62

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

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

Ashtreighlia
Copy link

Issue description

I encountered some bugs that were caused by user input errors (e.g. automatically assigning widths and heights => 0), leading to issues that were challenging to diagnose due to the lack of clear error messages. To address this, I have added checks for the "rect" and "roundrect" functions.

Added checks

These checks aim to ensure the correctness of incoming values and provide error messages if they are out-of-spec.

  • Height and width validation for "rect" and "roundrect"
  • Radius validation for "roundrect"

@ladyada ladyada requested a review from FoamyGuy August 20, 2023 17:06
Copy link

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I added one commit with changes that the CI formatter was upset about.

Thanks for the improved error handling @Ashtreighlia!

@FoamyGuy FoamyGuy merged commit 2108cbd into adafruit:main Aug 23, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 24, 2023
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