Migrate python collection types from typing types to native types#134
Open
chimosky wants to merge 3 commits intoroostorg:mainfrom
Open
Migrate python collection types from typing types to native types#134chimosky wants to merge 3 commits intoroostorg:mainfrom
chimosky wants to merge 3 commits intoroostorg:mainfrom
Conversation
EXBreder
reviewed
Feb 6, 2026
osprey_worker/src/osprey/worker/ui_api/osprey/views/tests/test_saved_queries.py
Show resolved
Hide resolved
osprey_worker/src/osprey/engine/ast_validator/validators/validate_static_types.py
Outdated
Show resolved
Hide resolved
osprey_worker/src/osprey/engine/ast_validator/validators/validate_static_types.py
Outdated
Show resolved
Hide resolved
osprey_worker/src/osprey/engine/ast_validator/validators/validate_static_types.py
Outdated
Show resolved
Hide resolved
4655e1d to
3c8e545
Compare
Contributor
Author
|
@julietshen kindly review. |
Member
EXBreder
approved these changes
Feb 20, 2026
3c8e545 to
bd615ba
Compare
Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
I'm keeping them here so as to avoid a potential bug, it's used in type checking and it makes sense to keep it, I've added a second type for Union using UnionType. Consistency with the placement of None for optional arguments has also been improved. Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
8b04621 to
eee8332
Compare
Contributor
Author
|
@julietshen I've rebased master on this, and it has been approved. Bringing this to your attention as you probably have a lot on your plate and this got drowned in your inbox. |
ayubun
reviewed
Mar 26, 2026
| # Mypy doesn't like runtime types like this | ||
| # noinspection PyTypeChecker | ||
| return Union[tuple(inner.to_typing_type() for inner in self.inner_types)] # type: ignore | ||
| return reduce(operator.or_, (inner.to_typing_type() for inner in self.inner_types)) # type: ignore |
Contributor
Author
There was a problem hiding this comment.
Yep, I got help from an LLM for this particular change.
Member
There was a problem hiding this comment.
why are we deleting this file ? i understand its commented out, and to be honest i forget why, but we should probably leave that for a diff pr ^^" saved queries are still something osprey supports
I deleted it before for no reason in particular as it was commented out, I'm adding it back now. Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25
All linting and type checking tests pass.