Closed Kuhlwein closed 1 year ago
Merging #274 (1f42670) into master (2bf9f45) will increase coverage by
0.01%
. The diff coverage is100.00%
.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@ Coverage Diff @@
## master #274 +/- ##
==========================================
+ Coverage 84.12% 84.14% +0.01%
==========================================
Files 9 9
Lines 945 946 +1
==========================================
+ Hits 795 796 +1
Misses 150 150
Impacted Files | Coverage Δ | |
---|---|---|
dash_extensions/enrich.py | 82.12% <100.00%> (+0.02%) |
:arrow_up: |
Could you add a small example demonstrating how the new functionality is used?
Sure, you can use it as described on the related issue, for instance:
@callback(
Output("some-output", "data"),
Input("some-input", "value")
)
def foo(bar: str) -> Serverside[str]:
return Serverside(bar)
It is of course still possible to omit the square brackets since Serverside
defaults to Serverside[Any]
.
I like this approach. One note is that in some cases, the return may not always be saved server side. But I guess in that case, one would just use a typehint of the form Union[str, Serverside[str]]
.
Make serverside generic in order to support better type hinting.
Solves #272