-
Notifications
You must be signed in to change notification settings - Fork 52
Issue 46 #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
Issue 46 #62
Conversation
…ity, all of these functions should be replaced. However, changing function names throughout should be its own issue.
|
We have not been able to merge your Pull Request, but because you are awesome - we wanted to make sure you could still get a SendGrid Hacktoberfest shirt. Please go fill out our swag form before Nov 5th and we will send the shirt! (We know that you might have tried this before and it didn’t work, sorry about that!) You have till Nov 5th to fill out this form in order to get the Hacktoberfest shirt!Thank you for contributing during Hacktoberfest! We hope to see you in the repos soon! Just so you know, we always give away a SendGrid shirt for your first ever non-Hacktoberfest PR that gets merged. |
| def add_attr(self, key, value, attr): | ||
| if attr not in self.data: | ||
| self.data[attr] = {} | ||
| self.data[attr][key] = value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def append_attr(self, value, attr): | ||
| if attr not in self.data: | ||
| self.data[attr] = [] | ||
| self.data[attr].append(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if 'category' not in self.data: | ||
| self.data['category'] = [] | ||
| self.data['category'].append(category) | ||
| append_attr(self, category, 'category') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some advantage to calling the method in the above manner instead of like this?
self.append_attr(category, 'category')| if 'section' not in self.data: | ||
| self.data['section'] = {} | ||
| self.data['section'][key] = section | ||
| add_attr(self, key, section, 'section') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.add_attr(key, section, 'section') # ?
misterdorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tranquilled Suggest going with the changes raised by @42B here, for some added cleanliness. Thanks for this work!!
|
Please also rebase to address conflicts. |
Created skeleton functions from which to create subfunctions; in reality, all of these functions should be replaced. However, changing function names throughout should be its own issue.
Fixes
Closes #46
Checklist
Short description of what this PR does:
If you have questions, please send an email to Sendgrid, or file a Github Issue in this repository.