You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using isort to organize imports in our project, we encountered a subtle issue where isort's reordering of import statements introduced a circular import problem in Python versions 3.8.19. This issue arises specifically in our simulation engine module, where the order of imports is crucial to avoid circular dependencies.
Environment
Python Version: 3.8
isort Version: 5.13.2
Minimal Working Example (MWE)
simulation.py
from __future__ importannotationsfrom .replication_managerimportReplicationManagerclassSimulation:
pass
replication_manager.py
from __future__ importannotationsfrom .simulationimportSimulationclassReplicationManager:
def__init__(self, simulation: Simulation):
self.simulation=simulation
init.py
from .simulationimportSimulationfrom .replication_managerimportReplicationManager__all__= ["Simulation", "ReplicationManager"]
In this example, running isort would reorder the imports in the init file a way that introduces a circular dependency between simulation.py and replication_manager.py.
The text was updated successfully, but these errors were encountered:
Description
When using
isort
to organize imports in our project, we encountered a subtle issue whereisort
's reordering of import statements introduced a circular import problem in Python versions 3.8.19. This issue arises specifically in our simulation engine module, where the order of imports is crucial to avoid circular dependencies.Environment
Minimal Working Example (MWE)
simulation.py
replication_manager.py
init.py
In this example, running isort would reorder the imports in the init file a way that introduces a circular dependency between simulation.py and replication_manager.py.
The text was updated successfully, but these errors were encountered: