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

Conformance to style standards #654

Closed
wants to merge 81 commits into from
Closed

Conformance to style standards #654

wants to merge 81 commits into from

Conversation

movanelli
Copy link

Fixes #632

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:

  • update .travis.yml to verify PEP8 errors
  • made changes in files as suggested by pycodestyle following PEP8 code compliance
├── register.py
├── setup.py
├── examples
│   ├── campaigns
│   │   └── campaigns.py
│   ├── categories
│   │   └── categories.py
│   ├── helpers
│   │   ├── mail_example.py
│   │   └── stats
│   │       └── stats_example.py
│   └── mail
│       └── mail.py
├── sendgrid
│   ├── sendgrid.py
│   └── helpers
│       ├── endpoints
│       │   └── ip
│       │      └── unassigned.py
│       ├── inbound
│       │   ├── app.py
│       │   ├── config.py
│       │   └── send.py
│       └── mail
│           ├── content.py
│           ├── exceptions.py
│           ├── mail.py
│           ├── personalization.py
│           ├── subscription_tracking.py
│           ├── tracking_settings.py
│           └── validators.py
├── sendgrid
│   ├── test_app.py
│   ├── test_mail.py
│   ├── test_project.py
│   ├── test_sendgrid.py
│   ├── test_stats.py
│   └── test_unassigned.py

If you have questions, please send an email to SendGrid, or file a GitHub Issue in this repository.

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 7, 2018
@SendGridDX
Copy link

SendGridDX commented Oct 7, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Oct 7, 2018

Codecov Report

Merging #654 into v4 will increase coverage by 0.42%.
The diff coverage is 75.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v4     #654      +/-   ##
==========================================
+ Coverage   84.35%   84.77%   +0.42%     
==========================================
  Files          36       35       -1     
  Lines         965     1156     +191     
  Branches      107      172      +65     
==========================================
+ Hits          814      980     +166     
+ Misses         93       90       -3     
- Partials       58       86      +28
Impacted Files Coverage Δ
sendgrid/helpers/mail/content.py 84.61% <ø> (ø) ⬆️
sendgrid/helpers/inbound/config.py 93.93% <ø> (ø) ⬆️
sendgrid/helpers/mail/validators.py 44.44% <ø> (ø) ⬆️
sendgrid/helpers/mail/tracking_settings.py 96.96% <ø> (ø) ⬆️
sendgrid/sendgrid.py 92% <100%> (+6.28%) ⬆️
sendgrid/helpers/inbound/app.py 78.26% <100%> (ø) ⬆️
sendgrid/helpers/mail/subscription_tracking.py 87.87% <100%> (ø) ⬆️
sendgrid/helpers/inbound/send.py 93.75% <100%> (ø) ⬆️
sendgrid/helpers/mail/personalization.py 93.25% <100%> (+0.2%) ⬆️
sendgrid/version.py 100% <100%> (ø)
... and 23 more

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 edd02e4...5a84109. Read the comment docs.

@misterdorm misterdorm added status: work in progress Twilio or the community is in the process of implementing hacktoberfest difficulty: medium fix is medium in difficulty and removed status: code review request requesting a community code review or review from Twilio labels Oct 11, 2018
@hugovk
Copy link
Contributor

hugovk commented Oct 20, 2018

In .travis.yml:

# errors W605 and W504 added to avoid inconsistent errors happening
# error W605 happening on validators.py:28:40 on a valid Regex
# error W504 happening on validators.py:54:29 on a valid line break operator
- pycodestyle --ignore=W605,W504 --exclude='build'

W605: The regex isn't quite valid, see #698 for a fix. Once that is merged, you should remove the W605 exception.


As a general point, it might be better to avoid global exceptions as that means all the other code is excluded. Instead, you can skip checking single lines like this:

regex = "\."  # noqa

Or better, skip checking only a single error type:

regex = "\."  # noqa: W605

Docs: https://pep8.readthedocs.io/en/latest/intro.html#error-codes

@thinkingserious thinkingserious added status: code review request requesting a community code review or review from Twilio type: docs update documentation change not affecting the code type: twilio enhancement feature request on Twilio's roadmap status: hacktoberfest approved and removed status: work in progress Twilio or the community is in the process of implementing type: docs update documentation change not affecting the code labels Oct 23, 2018
@thinkingserious
Copy link
Contributor

Hello @moshemeirelles,

Thanks again for the PR!

It's HACKTOBERFEST! We want to show our appreciation by sending you some special Hacktoberfest swag. If you have not already, could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@thinkingserious
Copy link
Contributor

Hello @moshemeirelles,

Could you please merge this against our v4 branch? Thank you!

With Best Regards,

Elmer

@movanelli
Copy link
Author

Thank you for suggestions @hugovk , I'll fix it 😄

For sure @thinkingserious

@movanelli movanelli changed the base branch from master to v4 October 28, 2018 19:52
@misterdorm misterdorm added status: work in progress Twilio or the community is in the process of implementing and removed status: code review request requesting a community code review or review from Twilio labels Oct 30, 2018
Copy link
Contributor

@misterdorm misterdorm left a comment

Choose a reason for hiding this comment

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

You'll need to rebase against v4, not merge. This PR now includes all the other history from master, which we don't want. Please rebase to v4 and include only your new commits, and force push to your branch. Or, create a new PR to replace this one. Thanks!

@thinkingserious thinkingserious added status: waiting for feedback waiting for feedback from the submitter and removed status: work in progress Twilio or the community is in the process of implementing labels Oct 30, 2018
@movanelli movanelli closed this Jan 3, 2019
@movanelli movanelli deleted the conformance-style-standards branch January 3, 2019 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: waiting for feedback waiting for feedback from the submitter type: twilio enhancement feature request on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet