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

Small cleanups to encode_url #1405

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Small cleanups to encode_url #1405

merged 5 commits into from
Oct 30, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 30, 2024

  • Avoid useless assignments
  • Combine nested if statements
  • Set raw_path in the cache since we already have it along with coverage to make sure its set correctly

- Avoid useless assignments
- Combine nested if statements
- Avoid useless assignments
- Combine nested if statements
@bdraco bdraco added the bot:chronographer:skip This PR does not need to include a change note label Oct 30, 2024
- Avoid useless assignments
- Combine nested if statements
@bdraco bdraco changed the title Small cleanups to encode_url Small cleanups to encode_url Oct 30, 2024
Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #1405 will not alter performance

Comparing encode_url_cleanups (aaa3dd8) with master (979e06a)

Summary

✅ 83 untouched benchmarks

@bdraco bdraco marked this pull request as ready for review October 30, 2024 20:22
@bdraco
Copy link
Member Author

bdraco commented Oct 30, 2024

1.32s call tests/test_url_benchmarks.py::test_human_repr

Unrelated but human_repr is a bit slow compared to everything else since all the quoting is pure python... not sure how frequently its used in production, but at least on Home Assistant testing its very rare

@bdraco bdraco enabled auto-merge (squash) October 30, 2024 20:23
@bdraco bdraco disabled auto-merge October 30, 2024 20:24
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.06%. Comparing base (0113797) to head (aaa3dd8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1405      +/-   ##
==========================================
+ Coverage   96.05%   96.06%   +0.01%     
==========================================
  Files          31       31              
  Lines        5748     5765      +17     
  Branches      343      344       +1     
==========================================
+ Hits         5521     5538      +17     
  Misses        201      201              
  Partials       26       26              
Flag Coverage Δ
CI-GHA 96.06% <100.00%> (+0.01%) ⬆️
MyPy 48.68% <31.81%> (-0.12%) ⬇️
OS-Linux 99.55% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.61% <100.00%> (?)
OS-macOS 99.30% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 99.28% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 99.51% <100.00%> (-0.02%) ⬇️
Py-3.11.10 99.51% <100.00%> (-0.02%) ⬇️
Py-3.11.9 99.28% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 99.51% <100.00%> (+0.23%) ⬆️
Py-3.13.0 99.51% <100.00%> (+0.23%) ⬆️
Py-3.9.13 99.23% <100.00%> (?)
Py-3.9.20 99.47% <100.00%> (?)
Py-pypy7.3.16 99.53% <100.00%> (?)
Py-pypy7.3.17 99.55% <100.00%> (?)
VM-macos-latest 99.30% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.55% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.61% <100.00%> (?)
pytest 99.55% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

yarl/_url.py Show resolved Hide resolved
@bdraco bdraco merged commit 5c2af26 into master Oct 30, 2024
44 of 46 checks passed
@bdraco bdraco deleted the encode_url_cleanups branch October 30, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant