diff --git a/src/django_components/__init__.py b/src/django_components/__init__.py index f1c5ccd4..83237fb2 100644 --- a/src/django_components/__init__.py +++ b/src/django_components/__init__.py @@ -50,7 +50,6 @@ def _filepath_to_python_module(file_path: Path) -> str: # Get the root dir, see https://stackoverflow.com/a/16413955/9788634 project_root = os.path.abspath(os.path.dirname(__name__)) - rel_path = os.path.relpath(file_path, start=project_root) rel_path_without_suffix = str(Path(rel_path).with_suffix("")) diff --git a/tests/test_autodiscover.py b/tests/test_autodiscover.py index 0c09684a..923cd1f7 100644 --- a/tests/test_autodiscover.py +++ b/tests/test_autodiscover.py @@ -158,4 +158,3 @@ class TestFilepathToPythonModule(SimpleTestCase): _filepath_to_python_module(Path("tests\\components\\relative_file\\relative_file.py")), "tests.components.relative_file.relative_file", ) -