-
Notifications
You must be signed in to change notification settings - Fork 793
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
perf: Fix issues with Chart|LayerChart.encode
, 1.32x speedup to infer_encoding_types
#3444
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
31dedc8
fix, doc, perf: Fix issues with `Chart|LayerChart.encode`, 1.33x spee…
dangotbanned 0b19a34
fix(typing): Resolve assignment type errors revealed
dangotbanned 0eb139d
fix(typing): Resolve direct arg-type errors revealed
dangotbanned 92d4ac3
fix(typing): Resolve `alt.condition` overload-related arg-type errors…
dangotbanned e4ab705
test: update `infer_encoding_types` tests
dangotbanned fe736f9
test: Rename `invalidChannel` to `invalidArgument`
dangotbanned 0e0e167
chore: remove PR note comment
dangotbanned 064039d
docs: fix typo
dangotbanned 0869b6c
Merge remote-tracking branch 'upstream/main' into encode-improve
dangotbanned dbe8a74
Exclude LookupData export from core.py to fix issue with mypy where i…
binste be472e6
Remove 'pd' and 'jsonschema' from __init__.py __all__. Unclear why th…
binste f8dd748
Format code
binste 8fa65d7
Merge branch 'main' into encode-improve
mattijn 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 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 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.
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.
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 the first time I see a forward slash,
/
as argument within a function. Can you explain what that does?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.
Sure @mattijn
/
is a marker for positional-only parameters. Any parameter to the left of/
is positional-only, and may not be used by name.In this case, calling
self._wrap_in_channel(encoding="enc", obj=[1,2,3])
raises aTypeError
. The python tutorial docs may be helpful for an overview as well.Personally, I like to use
/
in cases like:_wrap_in_channel
could logically be thought of as having parameters_wrap_in_channel(wrappee, wrapper)
.Looking back at PEP570, I see that this was introduced in
python3.8
, which may explain the feature's absence inaltair
until now.Hope all of that was helpful