Hello I want to import a class from another class.
My file structure is the following:
Project
│
├─ folder1/
│ └─ file1.py
│
└─ folder2
└─ file2.py
file1.py
from folder2.file2 import B
class A:
"""some things"""
file2.py
from folder1.file1 import A
class B:
"""something"""
class C(A):
"""something"""
When I run file1.py
It says:
File "./folder1/file1.py", line 1, in
from folder2.file2 import B
File "./folder2/models.py", line 1, in
from folder1.models import A
ImportError: cannot import name
A