-
Notifications
You must be signed in to change notification settings - Fork 100
Refactor MISSING_TYPE
and MISSING
#1873
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
Comments
I think the We actually have py-shiny/shiny/playwright/controller/_base.py Lines 74 to 97 in ee1a47e
A question about If it's the latter, then another option is to define a new generic type MISSING: MISSING_TYPE = MISSING_TYPE()
Deprecated = Union[T, MISSING_TYPE]
# Example usage
def f(x: int, y: Deprecated[int]) -> int:
... |
Yeah, it's equivalent to |
We could use extra helpers like
which would allow something like
This would mostly be for convenience and readability. In particular,
MISSING_TYPE
feels like a leaked implementation detail.We could also have a
maybe_missing()
helper that would look something like this:Originally posted by @gadenbuie in #1822 (comment)
The text was updated successfully, but these errors were encountered: