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

♻️ Move from Optional[X] to Union[X, None] for internal utils #5124

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

tiangolo
Copy link
Member

♻️ Move from Optional[X] to Union[X, None] for internal utils

@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #5124 (7a486b2) into master (8047230) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #5124   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          532       532           
  Lines        13672     13672           
=========================================
  Hits         13672     13672           

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 8047230...7a486b2. Read the comment docs.

@tiangolo tiangolo enabled auto-merge (squash) July 11, 2022 19:30
@github-actions
Copy link
Contributor

@tiangolo tiangolo merged commit b768643 into master Jul 11, 2022
@tiangolo tiangolo deleted the optional-to-union branch July 11, 2022 19:30
@josegonzalez
Copy link

I'm curious as to why this change was implemented. It doesn't break anything for me, I'm just wondering if Union should be preferred to Optional in my own code :D

@zoliknemet
Copy link

Simple answer: tiangolo prefers Union

@m9810223
Copy link

JeanArhancet pushed a commit to JeanArhancet/fastapi that referenced this pull request Aug 20, 2022
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.

4 participants