I'm using Ruff as an external tool in PyCharm, and trying to use a hotkey to run check --fix $FilePath$
to lint first and then format $FilePath$
to format, in that order.
I can run them individually but I'd like to do them both at once for my convenience. I tried to use ;
between them like PowerShell but it's not working, only running the first part of the argument check --fix $FilePath$
and throw warning: Failed to lint &: The system cannot find the file specified. (os error 2)
. I wonder if I'm doing it incorrectly or it's just not possible at all?
I'm using Ruff as an external tool in PyCharm, and trying to use a hotkey to run check --fix $FilePath$
to lint first and then format $FilePath$
to format, in that order.
I can run them individually but I'd like to do them both at once for my convenience. I tried to use ;
between them like PowerShell but it's not working, only running the first part of the argument check --fix $FilePath$
and throw warning: Failed to lint &: The system cannot find the file specified. (os error 2)
. I wonder if I'm doing it incorrectly or it's just not possible at all?
1 Answer
Reset to default 0It is not possible to run two commands in one tool. Instead, you can create a custom executable that runs Ruff twice with the given arguments.
ruff
twice. Does that work for you? – InSync Commented Feb 1 at 2:46