8000 ♻ Refactor dict value extraction to minimize key lookups `fastapi/utils.py` by ShahriyarR · Pull Request #3139 · fastapi/fastapi · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@ShahriyarR
Copy link
Contributor

There are 3 extra key/value lookups for update_dict, it can be eliminated by unpacking value in for loop directly.

@codecov
Copy link
codecov bot commented May 1, 2021

Codecov Report

Merging #3139 (6662091) into master (497e5a2) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #3139   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          531       531           
  Lines        13629     13629           
=========================================
  Hits         13629     13629           
Impacted Files Coverage Δ
fastapi/utils.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 497e5a2...6662091. Read the comment docs.

@github-actions
Copy link
Contributor
github-actions bot commented May 1, 2021

📝 Docs preview for commit 32df705 at: https://608d277e521eb71b0f16ecd0--fastapi.netlify.app

@tiangolo tiangolo changed the title unpack the value using .items() to eliminate 3 extra key lookup ♻ Refactor dict value extraction to minimize key lookups fastapi/utils.py May 12, 2022
@tiangolo tiangolo enabled auto-merge (squash) May 12, 2022 20:37
@tiangolo
Copy link
Member

Nice, thank you! 😎🚀

@tiangolo tiangolo merged commit 82775f7 into fastapi:master May 12, 2022
JeanArhancet pushed a commit to JeanArhancet/fastapi that referenced this pull request Aug 20, 2022
…ls.py` (fastapi#3139)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
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

0