-
Notifications
You must be signed in to change notification settings - Fork 171
chore: Fix IntoSchema typing, allow to pass Sequence[tuple[str, IntoDType]] | SupportsKeysAndGetItem[str, IntoDType]
#3266
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
Draft
FBruzzesi
wants to merge
12
commits into
main
Choose a base branch
from
chore/into-schema-overhaul-redo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
324a8dc
chore: Fix IntoSchema typing, allow Sequence[tuple[str, IntoDType]
FBruzzesi 983db99
Merge branch 'main' into chore/into-schema-overhaul-redo
FBruzzesi ab0bfab
missed one annotation
FBruzzesi 88136c3
pragma no cover exception
FBruzzesi 12bd5e9
Merge branch 'main' into chore/into-schema-overhaul-redo
FBruzzesi 476dc69
tricking ruff for better formatting
FBruzzesi c90c110
is exporting enough for forward reference?
FBruzzesi 38bac0e
delay NullableSchema import
FBruzzesi 9ce61fe
Use SupportsKeysAndGetItem and Iterable
FBruzzesi 0e0d7a8
one for two?
FBruzzesi 15e08d7
merge main
FBruzzesi 634bd33
lower diff, do not export SchemaDefinition
FBruzzesi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason for this class is mostly two folded:
Sequence[tuple[str, DType {|None}]]into a mapping. Hence make it easy to use the same API (key, dtype in obj.items()).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
Nullable*is making me think this is related to #3176 (comment) again π«£I'm not opposed to having classes to make our internal API cleaner btw π
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I see how it's related. Passing
Noneseems more like to be a free card, "live and let live" kind of behavior.Any preference in having it prefixed by
_?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already in
_utils, so no need for a prefix πThe current
_names are an artifact from when we had everything inutils.pyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to give a more complete explanation later, but I was hinting at
Nullable,Null,Nonebeing a bit overloaded.Linking to (#3176 (comment)) was supposed to show that I made this mistake already π