diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d4fee49f..d1c77b3709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [UNRELEASED] +## Added +- [#3369](https://github.com/plotly/dash/pull/3369) Expose `dash.NoUpdate` type + ## Fixed - [#3353](https://github.com/plotly/dash/pull/3353) Support pattern-matching/dict ids in `dcc.Loading` `target_components` diff --git a/dash/__init__.py b/dash/__init__.py index 6909c3aa7e..6f16a068aa 100644 --- a/dash/__init__.py +++ b/dash/__init__.py @@ -26,6 +26,7 @@ get_relative_path, strip_relative_path, ) +from ._no_update import NoUpdate # noqa: F401,E402 from .background_callback import ( # noqa: F401,E402 CeleryManager, DiskcacheManager, @@ -86,6 +87,7 @@ def _jupyter_nbextension_paths(): "page_registry", "Dash", "no_update", + "NoUpdate", "page_container", "Patch", "jupyter_dash", diff --git a/dash/_no_update.py b/dash/_no_update.py index b86004de72..778ccd5948 100644 --- a/dash/_no_update.py +++ b/dash/_no_update.py @@ -4,6 +4,8 @@ def to_plotly_json(self): # pylint: disable=no-self-use @staticmethod def is_no_update(obj): - return isinstance(obj, NoUpdate) or ( - isinstance(obj, dict) and obj == {"_dash_no_update": "_dash_no_update"} + return ( + obj is NoUpdate + or isinstance(obj, NoUpdate) + or (isinstance(obj, dict) and obj == {"_dash_no_update": "_dash_no_update"}) )