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

feat: Add equality to Email #739

Merged
merged 3 commits into from Mar 6, 2020
Merged

Conversation

@mcintyre94
Copy link
Contributor

@mcintyre94 mcintyre94 commented Nov 29, 2018

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file (I don't think any is relevant, but happy to add anything appropriate if I've missed it)
  • I have added in line documentation to the code I modified

Short description of what this PR does:

Email objects are defined as equal iff they have the same email and the same name.
This is useful for unit tests where we want to verify that the Email objects generated are as expected.

Email objects are defined as equal iff they have the same email and the same name.
This is useful for unit tests where we want to verify that the Email objects generated are as expected.
@SendGridDX
Copy link

@SendGridDX SendGridDX commented Nov 29, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

@codecov codecov bot commented Nov 29, 2018

Codecov Report

Merging #739 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #739      +/-   ##
==========================================
+ Coverage   82.41%   82.48%   +0.06%     
==========================================
  Files          70       70              
  Lines        2303     2312       +9     
  Branches      338      340       +2     
==========================================
+ Hits         1898     1907       +9     
  Misses        206      206              
  Partials      199      199              

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea90f7c...0e746ca. Read the comment docs.

mcintyre94 and others added 2 commits Nov 29, 2018
@childish-sambino childish-sambino changed the title Add equality to Email feat: Add equality to Email Mar 6, 2020
@childish-sambino childish-sambino merged commit b2ca1f4 into sendgrid:master Mar 6, 2020
3 checks passed
3 checks passed
codecov/patch 100.00% of diff hit (target 82.41%)
Details
codecov/project 82.48% (+0.06%) compared to ea90f7c
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mcintyre94 mcintyre94 deleted the mcintyre94:email-equality branch Mar 7, 2020
@eprykhodko
Copy link

@eprykhodko eprykhodko commented Jun 10, 2020

If, I may point out, this makes Email objects unhashable, which is inconvenient in some cases. For example getting rid of duplicates in a list of cc's. I suppose this should be considered a regression and should be fixed up?

@childish-sambino
Copy link
Contributor

@childish-sambino childish-sambino commented Jun 11, 2020

@eprykhodko Ack, taking a look. This was definitely not the intent.

@childish-sambino
Copy link
Contributor

@childish-sambino childish-sambino commented Jun 11, 2020

I'm just gonna roll this back. The original change was when the Email class only contained an email address and a name. Later (I don't understand why) other fields were introduced including a subject, substitutions, and a personalization.

childish-sambino added a commit that referenced this pull request Jun 11, 2020
This reverts commit b2ca1f4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.