-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
seaborn: mark simple deprecations with typing_extensions.deprecated #11130
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
stubs/seaborn/seaborn/algorithms.pyi
Outdated
random_seed: _Seed | None = None, # deprecated | ||
) -> NDArray[Any]: ... | ||
@overload | ||
@deprecated("Parameter `random_seed` is deprecated in favor of `seed`") |
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.
@@ -92,6 +92,7 @@ class _BaseGrid: | |||
**kwargs: Any, | |||
) -> Self: ... | |||
@property | |||
@deprecated("Attribute `fig` is deprecated in favor of `figure`") |
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.
@@ -139,7 +139,8 @@ def displot( | |||
facet_kws: dict[str, Any] | None = None, | |||
**kwargs: Any, | |||
) -> FacetGrid: ... | |||
def distplot( # deprecated | |||
@deprecated("Function `distplot` is deprecated and will be removed in seaborn v0.14.0") |
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.
# def set(*args, **kwargs) -> None: ... # deprecated alias for set_theme | ||
set = set_theme | ||
|
||
@deprecated("Function `set` is deprecated in favor of `set_theme`") |
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.
@@ -75,7 +75,8 @@ def saturate(color: ColorType) -> tuple[float, float, float]: ... | |||
def set_hls_values( | |||
color: ColorType, h: float | None = None, l: float | None = None, s: float | None = None | |||
) -> tuple[float, float, float]: ... | |||
def axlabel(xlabel: str, ylabel: str, **kwargs: Any) -> None: ... # deprecated | |||
@deprecated("Function `axlabel` is deprecated and will be removed in a future version") |
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 comment has been minimized.
This comment has been minimized.
Is the stubtest crash a known issue? |
Yeah, it's fixed on mypy master, the fix should be included as part of mypy 1.8 :) |
This comment has been minimized.
This comment has been minimized.
Thank you. I just confirmed that the change passes on mypy's |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
Thanks!
Note that I intentionally left out deprecated parameters of the big API functions as they would require overloads with very long signatures.