Skip to content

improvement: single '_' function names to work with linting#3143

Merged
mscolnick merged 2 commits into
mainfrom
ms/single-private-def
Dec 12, 2024
Merged

improvement: single '_' function names to work with linting#3143
mscolnick merged 2 commits into
mainfrom
ms/single-private-def

Conversation

@mscolnick

@mscolnick mscolnick commented Dec 12, 2024

Copy link
Copy Markdown
Contributor

This change makes the code-generation output mypy/pyright compliant

Fixes #1954
Fixes #2325

@vercel

vercel Bot commented Dec 12, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 2:37pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 2:37pm

@dmadisetti dmadisetti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look pretty straight forward, 2 thoughts:

  1. Is it worth preventing the user from naming a cell _ or __? Or does that restriction already exist
  2. If mypy is a standard that marimo wants to hold itself to, it might be worth adding tests to check some of the generated files: https://mypy.readthedocs.io/en/stable/extending_mypy.html these would also be a starting point for adding any other top level file changes

Otherwise +1 !

@mscolnick

Copy link
Copy Markdown
Contributor Author
  1. Is it worth preventing the user from naming a cell _ or __? Or does that restriction already exist
    yes this already does exist
  1. If mypy is a standard that marimo wants to hold itself to,
    agreed! but ill do that in a follow since there might be other mypy errors

@mscolnick
mscolnick merged commit e5af6a0 into main Dec 12, 2024
@mscolnick
mscolnick deleted the ms/single-private-def branch December 12, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make generated Python files mypy error-free Can Marimo use unique default names for cells to serialize to a nicer Python file?

3 participants