Skip to content

Conversation

@mmcshane
Copy link
Contributor

@mmcshane mmcshane commented Nov 7, 2023

Adds the Subcommand enum to indicate which ruff subcommand should be executed by run_ruff. At this time, only check and format are supported. As different subcommands support different parameters, argument generation is delegated based on the specific subcommand value.

The ruff format subcommand does not currently organize imports and there does not appear to be a way to convince it to do so. Until a unified command exists the approach taken here is to format and then make a second run of ruff check that only performs import formatting.

Pursuant to #53

Adds the Subcommand enum to indicate which `ruff` subcommand should be
executed by `run_ruff`. At this time, only `check` and `format` are
supported. As different subcommands support different parameters,
argument generation is delegated based on the specific subcommand value.

The `ruff format` subcommand does not currently organize imports and
there does not appear to be a way to convince it to do so. Until a
unified command exists the approach taken here is to format and then
make a second run of `ruff check` that _only_ performs import
formatting.
@mmcshane
Copy link
Contributor Author

mmcshane commented Nov 7, 2023

Whoops. I'll come back with something that works 3.7+

@mmcshane mmcshane closed this Nov 7, 2023
@ccordoba12
Copy link
Member

We dropped support for Python 3.7 in python-lsp-server in version 1.8.0, so I think there's no need for it still being supported here.

@mmcshane
Copy link
Contributor Author

mmcshane commented Nov 7, 2023

Oh well I was using match so I needed changes for 3.8 regardless. FYI the CI is still testing 3.7.

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.

2 participants