nbQA-dev / nbQA

Run ruff, isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks
https://nbqa.readthedocs.io/en/latest/index.html
MIT License
1.01k stars 39 forks source link

Version >= 1.8.0 breaks nbqa 'ruff format' shell command #843

Closed fvonbergen closed 5 months ago

fvonbergen commented 5 months ago

The following commit 2303a49df1a15d73fdbd525f41e37c3b3f82fcf8 breaks ruff nbqa usage of the form:

nbqa 'ruff format' .

Besides the main_command we could also analyze the subcommands list.

    if main_command == "ruff":
        subcommand = subcommands if len(subcommands) == 1 and subcommands[0] in ["check", "format"] else "check"
        sub_commands.insert(0, subcommand)
MarcoGorelli commented 5 months ago

thanks @fvonbergen for the report! fix incoming

MarcoGorelli commented 5 months ago

@all-contributors please add @fvonbergen for bugs

allcontributors[bot] commented 5 months ago

@MarcoGorelli

I've put up a pull request to add @fvonbergen! :tada:

fvonbergen commented 5 months ago

Thank you for the fast response :runner: @MarcoGorelli !!