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

Add transformer for request.xreadlines() #199

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

browniebroke
Copy link
Owner

Removed in Django 3.0:

HttpRequest.xreadlines() will be removed.

Deprecated since Django 2.0:

HttpRequest.xreadlines() is deprecated in favor of iterating over the request.

Fixes #52

@browniebroke browniebroke added the enhancement New feature or request label Sep 16, 2020
@browniebroke browniebroke added this to the Django 3.0 milestone Sep 16, 2020
@codecov
Copy link

codecov bot commented Sep 16, 2020

Codecov Report

Merging #199 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #199   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          639       649   +10     
=========================================
+ Hits           639       649   +10     
Impacted Files Coverage Δ
django_codemod/visitors/__init__.py 100.00% <ø> (ø)
django_codemod/visitors/http.py 100.00% <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 d609166...43205a4. Read the comment docs.

Removed in Django 3.0:

> HttpRequest.xreadlines() will be removed.

Deprecated in Django 2.0:

> HttpRequest.xreadlines() is deprecated in favor of iterating over the request.

Fixes #52
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 16, 2020

Sourcery Code Quality Report

This PR has an average code quality of 88.49%

Quality metrics Before After Change
Complexity 0.06 ⭐
Method Length 34.18 ⭐
Working memory 7.39 🙂
Quality % 88.49% %
Other metrics Before After Change
Lines 504
Changed files Quality Before Quality After Quality Change
django_codemod/visitors/init.py % 56.77% 🙂 %
django_codemod/visitors/http.py % 86.86% ⭐ %
tests/test_cli.py % 85.87% ⭐ %
tests/visitors/test_http.py % 96.19% ⭐ %

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

File Function Complexity Length Working Memory Quality Recommendation
tests/test_cli.py test_deprecated_in_mapping 0 67 🙂 38 ⛔ 57.66% 🙂 Extract out complex expressions
tests/test_cli.py test_removed_in_mapping 0 59 ⭐ 36 ⛔ 59.00% 🙂 Extract out complex expressions
tests/test_cli.py test_basic_arguments 1 ⭐ 94 🙂 11 😞 66.94% 🙂 Extract out complex expressions
tests/test_cli.py test_get_short_description 0 32 ⭐ 11 😞 77.52% ⭐ 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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@browniebroke browniebroke merged commit 26d896c into master Sep 16, 2020
@browniebroke browniebroke deleted the feat/request-xreadlines branch September 16, 2020 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Django 3.0: HttpRequest.xreadlines()
1 participant