From 752567bf7c40889fcba59967bd73eb7681a2d93c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 14 Apr 2024 14:49:07 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/django_components/__init__.py | 4 +--- tests/test_autodiscover.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/django_components/__init__.py b/src/django_components/__init__.py index 83237fb2..d057bbac 100644 --- a/src/django_components/__init__.py +++ b/src/django_components/__init__.py @@ -22,9 +22,7 @@ def autodiscover() -> None: # Autodetect a .py file in a components dir component_filepaths = search(search_glob="**/*.py").matched_files - logger.debug( - f"Autodiscover found {len(component_filepaths)} files in component directories." - ) + logger.debug(f"Autodiscover found {len(component_filepaths)} files in component directories.") for path in component_filepaths: # This imports the file and runs it's code. So if the file defines any diff --git a/tests/test_autodiscover.py b/tests/test_autodiscover.py index 923cd1f7..e9c789ca 100644 --- a/tests/test_autodiscover.py +++ b/tests/test_autodiscover.py @@ -1,6 +1,6 @@ from pathlib import Path - from unittest import mock + from django.template.engine import Engine from django.urls import include, path @@ -10,7 +10,7 @@ from .testutils import Django30CompatibleSimpleTestCase as SimpleTestCase # isort: on -from django_components import autodiscover, component, component_registry, _filepath_to_python_module +from django_components import _filepath_to_python_module, autodiscover, component, component_registry from django_components.template_loader import Loader urlpatterns = [