How to avoid circular dependency caused by type hinting of pointer attributes in python Consider the two modules (in the same folder):