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

fix: Resolve some bug risks and code quality issues #497

Merged
merged 1 commit into from
Nov 4, 2019
Merged

fix: Resolve some bug risks and code quality issues #497

merged 1 commit into from
Nov 4, 2019

Conversation

sanketsaurav
Copy link
Contributor

Changes:

  • Fix dangerous default argument in twilio/base/serialize.py (PYL-W0102)
  • Classmethods should have cls as the first arg. in twilio/jwt/validation/__init__.py and twilio/base/page.py (PYL-C0202)
  • Removed unused imports in tests/unit/http/test_validation_client.py and tests/unit/http/test_http_client.py (PYL-W0611)
  • Fix len() used as condition in twilio/request_validator.py (PYL-C1801)

This PR also adds .deepsource.toml configuration file to run continuous static analysis on the repo with DeepSource. Upon enabling DeepSource, quality and security analysis will be run on every PR to detect 500+ types of problems in the changes — including bug risks, anti-patterns, security vulnerabilities, etc.

DeepSource is a free to use for open-source projects, and is used by teams at NASA, Uber, Slack, Qubole, Dgraph among many others.

To enable DeepSource analysis after merging this PR, please follow these steps:

  1. Sign up on DeepSource with your GitHub account and grant access to this repo.
  2. Activate analysis on this repo here.

You can also look at the docs for more details. Do let me know if I can be of any help!

Cheers,

Sanket
Founder, DeepSource

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Changes:
- Fix dangerous default argument in `twilio/base/serialize.py` (PYL-W0102)
- Classmethods should have `cls` as the first arg. in `twilio/jwt/validation/__init__.py` and `twilio/base/page.py` (PYL-C0202)
- Removed unused imports in `tests/unit/http/test_validation_client.py` and `tests/unit/http/test_http_client.py` (PYL-W0611)
- Fix `len()` used as condition in `twilio/request_validator.py` (PYL-C1801)

Also added `.deepsource.toml` configuration file to run continuous static analysis on the repository with DeepSource.
Copy link
Contributor

@childish-sambino childish-sambino left a comment

Choose a reason for hiding this comment

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

LGTM

@childish-sambino childish-sambino changed the title Fix some bug risks and code quality issues fix: Resolve some bug risks and code quality issues Nov 4, 2019
@childish-sambino childish-sambino merged commit d647789 into twilio:master Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants