refactor: replace isort, black and flake8 with ruff (#1346)
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run

This commit is contained in:
Juro Oravec 2025-09-10 14:06:53 +02:00 committed by GitHub
parent 5279fd372a
commit f100cc1836
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
128 changed files with 3076 additions and 2599 deletions

View file

@ -1,14 +1,14 @@
import re
from dataclasses import dataclass
from typing import NamedTuple, Optional
from typing_extensions import NotRequired, TypedDict
import pytest
from django.template import Context
from typing_extensions import NotRequired, TypedDict
from django_components import Component, Empty, Slot, SlotInput
from django_components.testing import djc_test
from .testutils import setup_test_config
setup_test_config({"autodiscover": False})
@ -76,7 +76,7 @@ class TestComponentTyping:
kwargs=Button.Kwargs(name="name", age=123),
slots=Button.Slots(
header="HEADER",
footer=Slot(lambda ctx: "FOOTER"),
footer=Slot(lambda _ctx: "FOOTER"),
),
)
@ -124,7 +124,7 @@ class TestComponentTyping:
kwargs={"name": "name", "age": 123},
slots={
"header": "HEADER",
"footer": Slot(lambda ctx: "FOOTER"),
"footer": Slot(lambda _ctx: "FOOTER"),
},
)
@ -206,7 +206,7 @@ class TestComponentTyping:
kwargs={"name": "name", "age": 123},
slots={
"header": "HEADER",
"footer": Slot(lambda ctx: "FOOTER"),
"footer": Slot(lambda _ctx: "FOOTER"),
},
)
@ -314,7 +314,7 @@ class TestComponentTyping:
kwargs={"name": "name", "age": 123},
slots={
"header": "HEADER",
"footer": Slot(lambda ctx: "FOOTER"),
"footer": Slot(lambda _ctx: "FOOTER"),
},
)
@ -397,7 +397,7 @@ class TestComponentTyping:
kwargs=Button.Kwargs(name="name", age=123),
slots=Button.Slots(
header="HEADER",
footer=Slot(lambda ctx: "FOOTER"),
footer=Slot(lambda _ctx: "FOOTER"),
),
)
@ -412,7 +412,7 @@ class TestComponentTyping:
kwargs=Button.Kwargs(name="name", age=123),
slots=Button.Slots(
header="HEADER",
footer=Slot(lambda ctx: "FOOTER"),
footer=Slot(lambda _ctx: "FOOTER"),
),
)
@ -427,7 +427,7 @@ class TestComponentTyping:
kwargs=Button.Kwargs(age=123), # type: ignore[call-arg]
slots=Button.Slots(
header="HEADER",
footer=Slot(lambda ctx: "FOOTER"),
footer=Slot(lambda _ctx: "FOOTER"),
),
)
@ -438,7 +438,7 @@ class TestComponentTyping:
args=Button.Args(arg1="arg1", arg2="arg2"),
kwargs=Button.Kwargs(name="name", age=123),
slots=Button.Slots( # type: ignore[typeddict-item]
footer=Slot(lambda ctx: "FOOTER"), # Missing header
footer=Slot(lambda _ctx: "FOOTER"), # Missing header
),
)