Repository navigation
Scope the nested input keys of a kwargs input to that input - #46
Merged
Merged
Conversation
KwargsInputBase.pre_render named its get_kwargs function "get_kwargs", and mk_input_element_specs derives input keys from the function name, so every parameter inside any KwargsInput got the key get_kwargs_<param> and collided across functions. Name the function after the kwargs input's input_key. Fixes #40 (the MultiSourceInput shape it mentions is split out to #45) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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 #40.
KwargsInputBase.pre_renderbuilt its nested function asget_kwargs, andmk_input_element_specsderives input keys as<func name>_<param>, so every parameter inside anyKwargsInputwas keyedget_kwargs_<param>: two functions whose kwargs input each have adataparameter shared value, widget key and uploader state. The nested function is now named after the kwargs input's owninput_key(e.g.foo_kwargs), givingfoo_kwargs_data.Regression test:
tests/test_kwargs_input_keys.py(fails on master withget_kwargs_data). streamlitfront tests pass against this branch.The other finding in the issue (a
KwargsInputinside aMultiSourceInputfails at app build) is a separate problem, filed as #45.🤖 Generated with Claude Code