diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index 63f8b4215..78d46fb35 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -16,13 +16,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Get dependencies - run: pip install yapf isort + - name: Format the code + run: ruff format - - name: Format the code with yapf - run: yapf --recursive --in-place wger - - - name: Sort the imports with isort + # While ruff can also do some sorting, isort can still be configured to do more, + # like grouping imports, etc. + - name: Sort the imports run: isort . - name: Push a commit with the changed files diff --git a/manage.py b/manage.py index 5d93c5006..e716ec749 100644 --- a/manage.py +++ b/manage.py @@ -12,9 +12,7 @@ from wger.tasks import ( setup_django_environment, ) - -if __name__ == "__main__": - +if __name__ == '__main__': # If user passed the settings flag ignore the default wger settings if not any('--settings' in s for s in sys.argv): setup_django_environment(get_path('settings.py'))