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

Add Color comparison method #3646

Merged
merged 5 commits into from Aug 8, 2022

Conversation

aminalaee
Copy link
Contributor

@aminalaee aminalaee commented Jan 9, 2022

Change Summary

Adds __eq__ method to Color to handle comparisons.

We could also add the comparison method to the RGBA class, but I don't see it anyway being used publicly.

Related issue number

fix #3645

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@aminalaee
Copy link
Contributor Author

please review

pydantic/color.py Outdated Show resolved Hide resolved
@aminalaee
Copy link
Contributor Author

aminalaee commented Jan 18, 2022

@PrettyWood Do commits get squashed when merged?

@PrettyWood
Copy link
Member

Yes

@samuelcolvin samuelcolvin merged commit 90a103e into pydantic:master Aug 8, 2022
@samuelcolvin
Copy link
Member

thanks so much.

@aminalaee aminalaee deleted the add-color-comparison-method branch August 8, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color comparison is always false
3 participants