Skip to content

Removal of semicolon in notebooks #7300

@peendebak

Description

@peendebak

One of the default rules in ruff is to remove a trailing semicolon. That is fine for python scripts, for for jupyter notebook this can change the output of the code cells. A screenshot to illustrate:

image

The removal of the semicolon results in the output of the plt.plot command being displayed. Typically this is not the intention, so a semicolor is used to hide the command output and only the the plotted graph.

Can the ruff default settings be modified to remove semicolons for python files, but not for notebooks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions