-
Notifications
You must be signed in to change notification settings - Fork 4k
Clean signatures of wrapped DeltaGenerator methods #1099
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
Conversation
| that users have no access to. | ||
| Note that "self" is ignored by default. So to remove both "self" and the | ||
| next argument you'd pass num_args_to_remove=1. |
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.
This behavior is new. Not sure why functools.partial is removing self now, but it definitely is.
| """ | ||
|
|
||
| @_wraps_with_cleaned_sig(method, 2) # Remove self and element from sig. | ||
| @_wraps_with_cleaned_sig(method, 1) # Remove self and element from sig. |
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.
+1, I was seeing element in Intellij, so this should fix it.
* develop: (29 commits) Release 0.56.0 (streamlit#1101) Fix bug where icon assets were missing from "make install" (streamlit#1100) Clean signatures of wrapped DeltaGenerator methods (streamlit#1099) Using widgetId as the key when rendering elements (streamlit#1102) Pass --skip-lock to pipenv under pipenv-install Makefile target. (streamlit#1093) Allow wider range of int-like types in NumberInput (streamlit#1087) Fix missing caching URL (streamlit#1094) Version 0.55.1 (just pointing to new docs) (streamlit#1089) Retire python-3.7.4 CircleCI project. (streamlit#1086) Handle different Caching error messages (streamlit#1068) Fix an incomplete copy for a dict that's then modified. (streamlit#1078) Fix indentation error in fad994c. (streamlit#1084) Widgets unit tests (streamlit#1077) [mypy] First phase of work on testing Python type annotations. (streamlit#1079) Add CircleCI jobs to run the oldest and newest Python versions we support. (streamlit#1053) Improve docs (streamlit#1075) Adding CORS to troubleshooting guide. (streamlit#1001) Fix for the CORS check (streamlit#965) Advanced caching updates feb (streamlit#1040) Fixing add_rows index calculation (streamlit#1054) ...
* develop: (30 commits) [Screencast] Fixing countdown bug (streamlit#1082) Release 0.56.0 (streamlit#1101) Fix bug where icon assets were missing from "make install" (streamlit#1100) Clean signatures of wrapped DeltaGenerator methods (streamlit#1099) Using widgetId as the key when rendering elements (streamlit#1102) Pass --skip-lock to pipenv under pipenv-install Makefile target. (streamlit#1093) Allow wider range of int-like types in NumberInput (streamlit#1087) Fix missing caching URL (streamlit#1094) Version 0.55.1 (just pointing to new docs) (streamlit#1089) Retire python-3.7.4 CircleCI project. (streamlit#1086) Handle different Caching error messages (streamlit#1068) Fix an incomplete copy for a dict that's then modified. (streamlit#1078) Fix indentation error in fad994c. (streamlit#1084) Widgets unit tests (streamlit#1077) [mypy] First phase of work on testing Python type annotations. (streamlit#1079) Add CircleCI jobs to run the oldest and newest Python versions we support. (streamlit#1053) Improve docs (streamlit#1075) Adding CORS to troubleshooting guide. (streamlit#1001) Fix for the CORS check (streamlit#965) Advanced caching updates feb (streamlit#1040) ...
* develop: (53 commits) Update plotly.js to 1.52 (streamlit#1119) Add tooltip in Altair/Vega-lite docstring code (streamlit#1092) Ability to bind to a server address with server.address config option (streamlit#1107) [mypy] Enable check_untyped_defs throughout the codebase. (streamlit#1110) st.map: set "radiusMinPixels" to 3 (streamlit#1113) st.plotly_chart docs incorrectly refer to Altair (streamlit#1118) Fix BytesIO and numpy array data sources for audio/video (streamlit#1116) Show warning to user and use skipkeys=True if json.dumps causes TypeError (streamlit#1112) Server: store SessionInfo by id (streamlit#1056) [Screencast] Fixing countdown bug (streamlit#1082) Release 0.56.0 (streamlit#1101) Fix bug where icon assets were missing from "make install" (streamlit#1100) Clean signatures of wrapped DeltaGenerator methods (streamlit#1099) Using widgetId as the key when rendering elements (streamlit#1102) Pass --skip-lock to pipenv under pipenv-install Makefile target. (streamlit#1093) Allow wider range of int-like types in NumberInput (streamlit#1087) Fix missing caching URL (streamlit#1094) Version 0.55.1 (just pointing to new docs) (streamlit#1089) Retire python-3.7.4 CircleCI project. (streamlit#1086) Handle different Caching error messages (streamlit#1068) ...
Prior to this PR, something broke the signatures of wrapped DG methods. This was reflected in docs.streamlit.io (where things like
st.text(body)were written asst.text()) and in the Python console (e.g.help(st.text)). It was probably broken in IDEs too.That's because we use some magic to make our signatures cleaner, and something broke that magic. I fixed that now and added tests.