Skip to content

Commit d258658

Browse files
committed
fix ruff related checks
1 parent d041535 commit d258658

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.4.5
3+
rev: v0.6.0
44
hooks:
55
- id: ruff
66
- repo: local

tests/testproject/testapp/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
from django.contrib import admin
2+
13
from dalf.admin import (
24
DALFChoicesField,
35
DALFModelAdmin,
46
DALFRelatedField,
57
DALFRelatedFieldAjax,
68
DALFRelatedOnlyField,
79
)
8-
from django.contrib import admin
910

1011
from .models import Category, Post, Tag
1112

tests/testproject/testapp/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
register(PostFactory)
88

99

10-
@pytest.fixture()
10+
@pytest.fixture
1111
def posts():
1212
return PostFactory.create_batch(10)

tests/testproject/testapp/tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
from http import HTTPStatus
44

55
import pytest
6-
from dalf.admin import DALFChoicesField, DALFRelatedField, DALFRelatedFieldAjax, DALFRelatedOnlyField
76
from django.urls import reverse
87

8+
from dalf.admin import DALFChoicesField, DALFRelatedField, DALFRelatedFieldAjax, DALFRelatedOnlyField
9+
910
from .models import Post
1011

1112
csrf_token_pattern = re.compile(r'name="csrfmiddlewaretoken" value="([^"]+)"')
1213

1314

14-
@pytest.mark.django_db()
15+
@pytest.mark.django_db
1516
def test_post_admin_filters_basics(admin_client, posts): # noqa: ARG001
1617
posts_count = 10
1718
post_authors = set(Post.objects.values_list('author__username', flat=True))

0 commit comments

Comments
 (0)