🚨(backend) follow Ruff 2024.2 style introduced in v0.3.0

We recently updated Ruff from 0.2.2 to v0.3, which introduced
Ruff 2024.2 style. This new style updated Ruff formatter's behavior,
making our make lint command fails.

Ruff 2024.2 style add a blank line after the module docstring.
Please take a look at Ruff ChangeLog to get more info.
This commit is contained in:
Lebaud Antoine
2024-03-07 10:57:05 +01:00
committed by aleb_the_flash
parent dad81c8d73
commit 5ec0dcf206
36 changed files with 41 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
"""
Test suite for generated openapi schema.
"""
import json
from io import StringIO

View File

@@ -1,6 +1,7 @@
"""
Test for team accesses API endpoints in People's core app : create
"""
import random
import pytest

View File

@@ -1,6 +1,7 @@
"""
Test for team accesses API endpoints in People's core app : delete
"""
import random
import pytest

View File

@@ -1,6 +1,7 @@
"""
Test for team accesses API endpoints in People's core app : list
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,6 +1,7 @@
"""
Test for team accesses API endpoints in People's core app : retrieve
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,6 +1,7 @@
"""
Test for team accesses API endpoints in People's core app : update
"""
import random
from uuid import uuid4

View File

@@ -1,6 +1,7 @@
"""
Tests for Teams API endpoint in People's core app: create
"""
import pytest
from rest_framework.status import (
HTTP_201_CREATED,

View File

@@ -1,6 +1,7 @@
"""
Tests for Teams API endpoint in People's core app: delete
"""
import pytest
from rest_framework.status import (
HTTP_204_NO_CONTENT,

View File

@@ -1,6 +1,7 @@
"""
Tests for Teams API endpoint in People's core app: list
"""
from unittest import mock
import pytest

View File

@@ -1,6 +1,7 @@
"""
Tests for Teams API endpoint in People's core app: retrieve
"""
import pytest
from rest_framework.status import HTTP_200_OK, HTTP_401_UNAUTHORIZED, HTTP_404_NOT_FOUND
from rest_framework.test import APIClient

View File

@@ -1,6 +1,7 @@
"""
Tests for Teams API endpoint in People's core app: update
"""
import random
import pytest

View File

@@ -1,6 +1,7 @@
"""
Test contacts API endpoints in People's core app.
"""
from django.test.utils import override_settings
import pytest

View File

@@ -1,6 +1,7 @@
"""
Test users API endpoints in the People core app.
"""
from unittest import mock
import pytest

View File

@@ -192,9 +192,12 @@ def test_models_oidc_user_getter_invalid_token(django_assert_num_queries, monkey
monkeypatch.setattr(OIDCAuthenticationBackend, "get_userinfo", get_userinfo_mocked)
with django_assert_num_queries(0), pytest.raises(
SuspiciousOperation,
match="User info contained no recognizable user identification",
with (
django_assert_num_queries(0),
pytest.raises(
SuspiciousOperation,
match="User info contained no recognizable user identification",
),
):
klass.get_or_create_user(access_token="test-token", id_token=None, payload=None)

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the Contact model
"""
from django.core.exceptions import ValidationError
import pytest

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the Identity model
"""
from django.core.exceptions import ValidationError
import pytest

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the Invitation model
"""
from django.core.exceptions import ValidationError
import pytest

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the TeamAccess model
"""
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ValidationError

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the Team model
"""
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ValidationError

View File

@@ -1,6 +1,7 @@
"""
Unit tests for the User model
"""
from unittest import mock
from django.core.exceptions import ValidationError

View File

@@ -1,6 +1,7 @@
"""
Test Throttle in People's app.
"""
import pytest
from rest_framework.test import APIClient