Skip to content

Issue #587 Change type of category in Mail.add_category from string to Category - #595

Merged
thinkingserious merged 1 commit into
sendgrid:masterfrom
lifez:fix-docstring-for-add_category
Aug 16, 2018
Merged

Issue #587 Change type of category in Mail.add_category from string to Category#595
thinkingserious merged 1 commit into
sendgrid:masterfrom
lifez:fix-docstring-for-add_category

Conversation

@lifez

@lifez lifez commented Aug 3, 2018

Copy link
Copy Markdown
Contributor

Fixes

#587

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 have added in line documentation to the code I modified

Short description of what this PR does:

  • Change type of category in Mail.add_category from string to Category to prevent warning from some editors

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Aug 3, 2018
@SendGridDX

SendGridDX commented Aug 3, 2018

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lifez

lifez commented Aug 4, 2018

Copy link
Copy Markdown
Contributor Author

How I can rebuild again without any commit?

@thinkingserious

Copy link
Copy Markdown
Contributor

No need to worry about that, we'll take care of it in the code review. Thanks!

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap difficulty: easy fix is easy in difficulty labels Aug 4, 2018
return self._categories

def add_category(self, category):
"""Add a Category to this Mail. Must be less than 255 characters.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What was your reason behind this deletion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since Category is a Category type Must be less than 255 characters. is not suitable.

"""Add a Category to this Mail.

:type category: string
:type category: Category

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is correct, thank you for pointing it out!

@codecov

codecov Bot commented Aug 6, 2018

Copy link
Copy Markdown

Codecov Report

Merging #595 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #595   +/-   ##
=======================================
  Coverage   86.61%   86.61%           
=======================================
  Files          32       32           
  Lines         979      979           
  Branches      131      131           
=======================================
  Hits          848      848           
  Misses         67       67           
  Partials       64       64
Impacted Files Coverage Δ
sendgrid/helpers/mail/mail.py 94.87% <100%> (ø) ⬆️

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 1ac58c6...65f4857. Read the comment docs.

@af4ro af4ro added status: ready for deploy code ready to be released in next deploy and removed status: code review request requesting a community code review or review from Twilio labels Aug 13, 2018
@thinkingserious
thinkingserious merged commit 7f6ed60 into sendgrid:master Aug 16, 2018
@thinkingserious

Copy link
Copy Markdown
Contributor

Hello @lifez,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: easy fix is easy in difficulty status: ready for deploy code ready to be released in next deploy type: community enhancement feature request not on Twilio's roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants