🚨(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:
6
.github/workflows/impress.yml
vendored
6
.github/workflows/impress.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user