pyright basically ignores typing.TYPE_CHECKING by design when circular import detection is enabled, because they argue, reasonably imo, that it makes the code fragile -- what's being checked is different from what's being run, etc.
Even though in our case it's not a bad thing, I'm sure there must be a way to get rid of this.
Cycle detected in import chain
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/gstate.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/resources/inventory.pyPylance
Cycle detected in import chain
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/gstate.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/resources/inventory.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/mgr.pyPylance
Cycle detected in import chain
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/gstate.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/resources/inventory.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/mgr.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/deployment.pyPylance
Cycle detected in import chain
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/gstate.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/resources/inventory.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/mgr.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/deployment.py
/home/joao/code/projects/aquarist-labs/aquarium.git/src/gravel/controllers/nodes/etcd.pyPylance
pyright basically ignores
typing.TYPE_CHECKING
by design when circular import detection is enabled, because they argue, reasonably imo, that it makes the code fragile -- what's being checked is different from what's being run, etc.Even though in our case it's not a bad thing, I'm sure there must be a way to get rid of this.