Skip to content

Commit 5f435d4

Browse files
authored
Merge branch 'dev' into devtool-hook
2 parents 1042956 + bfca375 commit 5f435d4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
44

55
## [UNRELEASED]
66

7+
## Added
8+
- [#3369](https://github.com/plotly/dash/pull/3369) Expose `dash.NoUpdate` type
9+
710
## Fixed
811
- [#3353](https://github.com/plotly/dash/pull/3353) Support pattern-matching/dict ids in `dcc.Loading` `target_components`
912

dash/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
get_relative_path,
2727
strip_relative_path,
2828
)
29+
from ._no_update import NoUpdate # noqa: F401,E402
2930
from .background_callback import ( # noqa: F401,E402
3031
CeleryManager,
3132
DiskcacheManager,
@@ -86,6 +87,7 @@ def _jupyter_nbextension_paths():
8687
"page_registry",
8788
"Dash",
8889
"no_update",
90+
"NoUpdate",
8991
"page_container",
9092
"Patch",
9193
"jupyter_dash",

dash/_no_update.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ def to_plotly_json(self): # pylint: disable=no-self-use
44

55
@staticmethod
66
def is_no_update(obj):
7-
return isinstance(obj, NoUpdate) or (
8-
isinstance(obj, dict) and obj == {"_dash_no_update": "_dash_no_update"}
7+
return (
8+
obj is NoUpdate
9+
or isinstance(obj, NoUpdate)
10+
or (isinstance(obj, dict) and obj == {"_dash_no_update": "_dash_no_update"})
911
)

0 commit comments

Comments
 (0)