Skip to content

Conversation

@dmadisetti
Copy link
Collaborator

📝 Summary

Adds common genai mistake where the last expression is expected to conditionally show if nested in an expression. Example:

if condition:
    mo.md("Condition was true")
else:
    mo.md("Condition was false")

@dmadisetti dmadisetti requested a review from akshayka as a code owner November 24, 2025 18:46
@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Nov 25, 2025 3:15pm

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 24, 2025
mscolnick
mscolnick previously approved these changes Nov 24, 2025
Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

nice rule!

@mscolnick
Copy link
Contributor

it seems like there are a few false-positives. maybe we can special case mo.md or all mo.ui (except mo.output, mo.stop)

@dmadisetti
Copy link
Collaborator Author

(except mo.output, mo.stop)

This is a good diea

@@ -0,0 +1,64 @@
import marimo
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be worth capturing a valid use-cases as well in here:

  • mo.output
  • mo.stop
  • sys.*

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

nice!

@dmadisetti dmadisetti merged commit ad5ff77 into main Nov 25, 2025
39 of 41 checks passed
@dmadisetti dmadisetti deleted the dm/branch-rule branch November 25, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants