Skip to content

feat: Expose NoUpdate type #3369

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

Merged
merged 5 commits into from
Jul 17, 2025
Merged

feat: Expose NoUpdate type #3369

merged 5 commits into from
Jul 17, 2025

Conversation

ytausch
Copy link
Contributor

@ytausch ytausch commented Jul 15, 2025

Closes #2800.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • expose dash.NoUpdate
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR -> not needed

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

@ytausch ytausch marked this pull request as ready for review July 15, 2025 17:06
@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken community community contribution labels Jul 15, 2025
Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add obj is NoUpdate or ... in the conditions of NoUpdate.is_no_update if this is exposed so it could be used as is.

@ytausch
Copy link
Contributor Author

ytausch commented Jul 16, 2025

Isn't this already the case? If you mean an isinstance check.

class NoUpdate:
def to_plotly_json(self): # pylint: disable=no-self-use
return {"_dash_no_update": "_dash_no_update"}
@staticmethod
def is_no_update(obj):
return isinstance(obj, NoUpdate) or (
isinstance(obj, dict) and obj == {"_dash_no_update": "_dash_no_update"}
)

@ytausch ytausch requested a review from T4rk1n July 16, 2025 15:37
@ytausch
Copy link
Contributor Author

ytausch commented Jul 16, 2025

Ah, you referred back to the original issue. I added the condition.

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a formatting issue.

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Thank you.

@T4rk1n T4rk1n merged commit bfca375 into plotly:dev Jul 17, 2025
9 checks passed
@ytausch ytausch deleted the expose-noupdate branch July 17, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants