Skip to content

Add setting to disable using semicolons to combine lines #121

Description

@Archmonger

While I know that merging lines via semicolons is an attractive way to save character space, this really should be a feature that can be turned off.

I'm currently running into issues getting python-minifier to play nice with the WASM-based pyodide interpreter due to their lack of support for semicolons.

But in my opinion, there should be enough configuration options within the minifier(...) API to where if I set every boolean to false, then zero minification should occur.

Activity

  1. dflook commented on Feb 10, 2025

    @dflook
    Owner

    python-minifier parses a Python code module and then serializes it back to valid Python code. When all options to minify() are False, the output remains functionally identical, though formatting may differ since python-minifier does not preserve the original source formatting.

    Semicolons are a valid part of the Python language, so it's surprising that Pyodide does not support them—I would expect to find them in Python modules in the wild.

    We could consider adding an option in the future to control semicolon usage, as there have been requests both to use them more frequently and to avoid them entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions