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

@ -5,8 +5,10 @@ from textwrap import dedent
from unittest.mock import patch
from django.core.management import call_command
from django_components import CommandArg, CommandArgGroup, ComponentCommand, ComponentExtension
from django_components.testing import djc_test
from .testutils import setup_test_config
setup_test_config({"autodiscover": False})
@ -51,7 +53,7 @@ class DummyCommand(ComponentCommand):
kwargs.pop("_command")
kwargs.pop("_parser")
sorted_kwargs = dict(sorted(kwargs.items()))
print(f"DummyCommand.handle: args={args}, kwargs={sorted_kwargs}")
print(f"DummyCommand.handle: args={args}, kwargs={sorted_kwargs}") # noqa: T201
class DummyExtension(ComponentExtension):
@ -85,7 +87,7 @@ class TestExtensionsCommand:
{{list,run}}
list List all extensions.
run Run a command added by an extension.
"""
""",
).lstrip()
)
@ -221,7 +223,7 @@ class TestExtensionsRunCommand:
subcommands:
{{dummy}}
dummy Run commands added by the 'dummy' extension.
"""
""",
).lstrip()
)
@ -248,7 +250,7 @@ class TestExtensionsRunCommand:
subcommands:
{{dummy_cmd}}
dummy_cmd Dummy command description.
"""
""",
).lstrip()
)
@ -275,7 +277,7 @@ class TestExtensionsRunCommand:
subcommands:
{{dummy_cmd}}
dummy_cmd Dummy command description.
"""
""",
).lstrip()
)
@ -294,7 +296,7 @@ class TestExtensionsRunCommand:
== dedent(
"""
DummyCommand.handle: args=(), kwargs={'bar': None, 'baz': None, 'foo': None, 'force_color': False, 'no_color': False, 'pythonpath': None, 'settings': None, 'skip_checks': True, 'traceback': False, 'verbosity': 1}
""" # noqa: E501
""", # noqa: E501
).lstrip()
)