🚨(CI) fix linter backend

The linter in the CI was checking only the
impress directory. We were passing near some lint
issues. Now the linter checks the whole backend
directory.
This commit is contained in:
Anthony LC
2024-05-29 22:08:54 +02:00
committed by Anthony LC
parent dbd4477e9a
commit f1227ed037
3 changed files with 9 additions and 8 deletions

View File

@@ -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:

View File

@@ -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(

View File

@@ -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