From 8003157daff21e5b54223f1e7b40a3d48f28154b Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 29 Jan 2023 10:38:41 +0100 Subject: [PATCH] Introduce ruff --- .github/workflows/test.yaml | 2 + .idea/watcherTasks.xml | 22 +++- .pre-commit-config.yaml | 22 +--- pyproject.toml | 107 ++++++++++++------ requirements-dev.in | 1 + requirements-dev.txt | 18 +++ src/character/admin.py | 5 +- .../commands/import_capabilities.py | 4 +- .../commands/import_harmful_states.py | 4 +- .../management/commands/import_paths.py | 7 +- .../management/commands/import_profiles.py | 9 +- .../management/commands/import_races.py | 4 +- .../management/commands/import_weapons.py | 4 +- .../0039_alter_character_profile_picture.py | 2 +- src/character/models/capabilities.py | 8 +- src/character/models/character.py | 7 +- .../templatetags/character_extras.py | 8 +- src/character/tests/test_access.py | 18 +-- src/character/tests/test_character.py | 2 +- src/character/tests/test_interactions.py | 8 +- src/character/tests/test_modifier.py | 2 +- src/character/views.py | 13 +-- src/charasheet/context_processors.py | 2 +- src/charasheet/middleware.py | 2 +- src/charasheet/settings.py | 18 +-- src/common/tests/test_admin.py | 12 +- src/conftest.py | 13 ++- src/party/tests/test_interactions.py | 20 ++-- tasks.py | 4 +- 29 files changed, 206 insertions(+), 142 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c871480..5532484 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,8 @@ jobs: run: | pip install pip-tools pip-sync requirements.txt requirements-dev.txt + - name: Ruff + run: ruff --format=github . - name: Test run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered working-directory: ./src/ diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml index 98b3257..e78ac61 100644 --- a/.idea/watcherTasks.xml +++ b/.idea/watcherTasks.xml @@ -21,7 +21,7 @@