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

Remove dependency for get_client_ip #127

Merged
merged 2 commits into from
Dec 4, 2021
Merged

Remove dependency for get_client_ip #127

merged 2 commits into from
Dec 4, 2021

Conversation

sumit4613
Copy link
Member

@sumit4613 sumit4613 commented Oct 4, 2021

Hey, I just made a Pull Request!

Description

This PR removes dependency from drf-addons for get_client_ip.

Motivation and Context

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit tests (no major decrease in code coverage %).
  • All tests pass.
  • Docstring coverage is 100% via interrogate drf_user (I mean, we should set a good example 😄).
  • Updates to documentation:
    • Document any relevant additions/changes in README.md.
    • Manually update both the README.md and docs/index.rst for any new changes.
    • Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note


@codecov
Copy link

codecov bot commented Oct 4, 2021

Codecov Report

Merging #127 (97f4100) into master (8521a7d) will increase coverage by 0.04%.
The diff coverage is 97.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
+ Coverage   95.68%   95.73%   +0.04%     
==========================================
  Files          20       20              
  Lines         649      656       +7     
==========================================
+ Hits          621      628       +7     
  Misses         28       28              
Impacted Files Coverage Δ
drf_user/utils.py 96.87% <97.29%> (+0.24%) ⬆️
drf_user/views.py 97.86% <100.00%> (ø)

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 8521a7d...97f4100. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Dec 4, 2021

This pull request fixes 1 alert when merging 49d51cd into 8521a7d - view on LGTM.com

fixed alerts:

  • 1 for Information exposure through an exception

@lgtm-com
Copy link

lgtm-com bot commented Dec 4, 2021

This pull request fixes 1 alert when merging 1b8a3d5 into 8521a7d - view on LGTM.com

fixed alerts:

  • 1 for Information exposure through an exception

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 4, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.65%.

Quality metrics Before After Change
Complexity 2.06 ⭐ 1.98 ⭐ -0.08 👍
Method Length 45.76 ⭐ 44.78 ⭐ -0.98 👍
Working memory 6.59 🙂 6.50 🙂 -0.09 👍
Quality 79.94% 80.59% 0.65% 👍
Other metrics Before After Change
Lines 1413 1468 55
Changed files Quality Before Quality After Quality Change
drf_user/utils.py 70.48% 🙂 72.14% 🙂 1.66% 👍
drf_user/views.py 61.72% 🙂 61.72% 🙂 0.00%
tests/test_utils.py 93.05% ⭐ 92.96% ⭐ -0.09% 👎
tests/test_views.py 87.69% ⭐ 87.69% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
drf_user/views.py OTPLoginView.post 15 🙂 245 ⛔ 10 😞 41.48% 😞 Try splitting into smaller methods. Extract out complex expressions
drf_user/views.py OTPView.post 11 🙂 142 😞 13 😞 47.97% 😞 Try splitting into smaller methods. Extract out complex expressions
drf_user/utils.py generate_otp 4 ⭐ 109 🙂 12 😞 60.18% 🙂 Extract out complex expressions
drf_user/views.py LoginView.post 0 ⭐ 93 🙂 13 😞 64.78% 🙂 Extract out complex expressions
drf_user/utils.py login_user 3 ⭐ 100 🙂 10 😞 66.01% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@lgtm-com
Copy link

lgtm-com bot commented Dec 4, 2021

This pull request fixes 1 alert when merging 97f4100 into 8521a7d - view on LGTM.com

fixed alerts:

  • 1 for Information exposure through an exception

@sumit4613 sumit4613 merged commit eb9d4c3 into master Dec 4, 2021
@sumit4613 sumit4613 deleted the sumit/remove-deps branch December 4, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant