diff --git a/src/django_components/__init__.py b/src/django_components/__init__.py index 5f42192f..7d54377b 100644 --- a/src/django_components/__init__.py +++ b/src/django_components/__init__.py @@ -41,7 +41,7 @@ def import_file(file_path: Path) -> None: rel_path = os.path.relpath(file_path, start=project_root) rel_path_without_suffix = str(Path(rel_path).with_suffix("")) module_name = rel_path_without_suffix.replace(os.sep, ".") - + # This imports the file and runs it's code. So if the file defines any # django components, they will be registered. importlib.import_module(module_name) diff --git a/src/django_components/utils.py b/src/django_components/utils.py index 13e5f018..04c2e522 100644 --- a/src/django_components/utils.py +++ b/src/django_components/utils.py @@ -1,6 +1,6 @@ import glob from pathlib import Path -from typing import List, Optional, NamedTuple +from typing import List, NamedTuple, Optional from django.template.engine import Engine