Self hosted FLOSS fitness/workout, nutrition and weight tracker
Automatically format the code with ruff
Roland Geidere2f8d5078c4b
diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.ymlindex 63f8b4215..78d46fb35 100644--- a/.github/workflows/formatter.yml+++ b/.github/workflows/formatter.yml@@ -16,13 +16,12 @@ jobs:- name: Checkout codeuses: 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 importsrun: isort .- name: Push a commit with the changed filesdiff --git a/manage.py b/manage.pyindex 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 settingsif not any('--settings' in s for s in sys.argv):setup_django_environment(get_path('settings.py'))