diff --git a/.github/workflows/impress.yml b/.github/workflows/impress.yml index ae170708..2219733b 100644 --- a/.github/workflows/impress.yml +++ b/.github/workflows/impress.yml @@ -93,11 +93,11 @@ jobs: - name: Install development dependencies run: pip install --user .[dev] - name: Check code formatting with ruff - run: ~/.local/bin/ruff format impress --diff + run: ~/.local/bin/ruff format . --diff - name: Lint code with ruff - run: ~/.local/bin/ruff check impress + run: ~/.local/bin/ruff check . - name: Lint code with pylint - run: ~/.local/bin/pylint impress + run: ~/.local/bin/pylint . test-back: diff --git a/src/backend/demo/management/commands/create_demo.py b/src/backend/demo/management/commands/create_demo.py index 8a26343e..a8d7e598 100644 --- a/src/backend/demo/management/commands/create_demo.py +++ b/src/backend/demo/management/commands/create_demo.py @@ -1,7 +1,6 @@ # ruff: noqa: S311, S106 """create_demo management command""" -import json import logging import random import time @@ -110,10 +109,14 @@ def create_demo(stdout): queue = BulkQueue(stdout) with Timeit(stdout, "Creating Template"): - with open("demo/data/template/code.txt", "r") as text_file: + with open( + file="demo/data/template/code.txt", mode="r", encoding="utf-8" + ) as text_file: code_data = text_file.read() - with open("demo/data/template/css.txt", "r") as text_file: + with open( + file="demo/data/template/css.txt", mode="r", encoding="utf-8" + ) as text_file: css_data = text_file.read() queue.push( diff --git a/src/backend/demo/tests/test_commands_create_demo.py b/src/backend/demo/tests/test_commands_create_demo.py index 27b040c9..057b57e3 100644 --- a/src/backend/demo/tests/test_commands_create_demo.py +++ b/src/backend/demo/tests/test_commands_create_demo.py @@ -1,7 +1,5 @@ """Test the `create_demo` management command""" -from unittest import mock - from django.core.management import call_command from django.test import override_settings