Closed jthevos closed 8 months ago
Thanks for looking at this!
There is actually already a draft PR to add metadata relating to whether or not the import is within an if TYPE_CHECKING
block, take a look! It seems to have stalled but I don't think it's that far off.
I'm not sure about expanding this to conditionals in general. I suppose adding a flag is_conditional
to each import could be a way to go, but other than for if TYPE_CHECKING
, I'm not sure I can think of a genuine use case. Feel free to propose one.
Superceded by https://github.com/seddonym/grimp/pull/133.