Browse Source

[ruff] Change runruff args order and update docstring example (#3842)

Harsh Gupta 1 year ago
parent
commit
acc74f1b99
1 changed files with 4 additions and 5 deletions
  1. 4 5
      desktop/core/src/desktop/management/commands/runruff.py

+ 4 - 5
desktop/core/src/desktop/management/commands/runruff.py

@@ -15,18 +15,17 @@
 # See the License for the specific language governing permissions and
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # limitations under the License.
 
 
+import sys
 import logging
 import logging
 import os.path
 import os.path
-import subprocess
-import sys
 import argparse
 import argparse
+import subprocess
 
 
 from django.core.management.base import BaseCommand
 from django.core.management.base import BaseCommand
 from django.utils.translation import gettext as _
 from django.utils.translation import gettext as _
 
 
 from desktop.lib import paths
 from desktop.lib import paths
 
 
-
 LOG = logging.getLogger()
 LOG = logging.getLogger()
 
 
 
 
@@ -47,10 +46,10 @@ class Command(BaseCommand):
         ./build/env/bin/hue runruff check file1.py file2.py
         ./build/env/bin/hue runruff check file1.py file2.py
 
 
       Run Ruff linting on files changed between the current branch and a specified diff branch:
       Run Ruff linting on files changed between the current branch and a specified diff branch:
-        ./build/env/bin/hue runruff check --diff-branch=origin/master
+        ./build/env/bin/hue runruff --diff-branch=origin/master check
 
 
       Automatically fix all Ruff errors on files changed between the current branch and a specified diff branch:
       Automatically fix all Ruff errors on files changed between the current branch and a specified diff branch:
-        ./build/env/bin/hue runruff check --diff-branch=origin/master --fix
+        ./build/env/bin/hue runruff --diff-branch=origin/master check --fix
 
 
     Note:
     Note:
       Make sure to install Ruff first by running `./build/env/bin/pip install ruff` in your environment.
       Make sure to install Ruff first by running `./build/env/bin/pip install ruff` in your environment.