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

[python] Convert from Optional[Foo] to Foo | None #3453

Conversation

mojaveazure
Copy link
Member

@mojaveazure mojaveazure commented Dec 17, 2024

Convert Optional to union types

SC-60887

resolves #3334

@mojaveazure mojaveazure force-pushed the paulhoffman/sc-60887/python-convert-from-optional-foo-to-foo-none branch from ae736c4 to 5a411de Compare December 17, 2024 00:51
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 98.96907% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.32%. Comparing base (1fa2666) to head (1e06649).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3453      +/-   ##
==========================================
+ Coverage   86.24%   86.32%   +0.07%     
==========================================
  Files          55       55              
  Lines        6305     6339      +34     
==========================================
+ Hits         5438     5472      +34     
  Misses        867      867              
Flag Coverage Δ
python 86.32% <98.96%> (+0.07%) ⬆️

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

Components Coverage Δ
python_api 86.32% <98.96%> (+0.07%) ⬆️
libtiledbsoma ∅ <ø> (∅)

@mojaveazure mojaveazure force-pushed the paulhoffman/sc-60887/python-convert-from-optional-foo-to-foo-none branch from efa8011 to 30a0df3 Compare December 17, 2024 19:32
@mojaveazure mojaveazure marked this pull request as ready for review December 17, 2024 20:42
Copy link
Member

@johnkerl johnkerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mojaveazure !! :)

@mojaveazure mojaveazure merged commit 884342a into main Dec 17, 2024
31 checks passed
@mojaveazure mojaveazure deleted the paulhoffman/sc-60887/python-convert-from-optional-foo-to-foo-none branch December 17, 2024 23:17
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
* [python] Convert from `Optional[Foo]` to `Foo | None`
Convert `Optional` to [union
types](https://docs.python.org/3/library/stdtypes.html#union-type)

[SC-60887](https://app.shortcut.com/tiledb-inc/story/60887)

resolves #3334

* Use union types in submodules

* Use union types in tests

* Use `Union[]` instead of `| None`

* Use union types for top-level init files
johnkerl pushed a commit that referenced this pull request Dec 18, 2024
* [python] Convert from `Optional[Foo]` to `Foo | None`
Convert `Optional` to [union
types](https://docs.python.org/3/library/stdtypes.html#union-type)

[SC-60887](https://app.shortcut.com/tiledb-inc/story/60887)

resolves #3334

* Use union types in submodules

* Use union types in tests

* Use `Union[]` instead of `| None`

* Use union types for top-level init files

Co-authored-by: Paul Hoffman <[email protected]>
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.

[python] Convert from Optional[Foo] to Foo|None
2 participants