Commit c2c72da
authored
Don't infinite loop on self deps in --follow-imports=normal (#9302)
There are situations in complex SCCs where the semantic analyzer will
infer self dependencies, which will cause an infinite loop in `dmypy
--follow-imports=normal`.
It's probably a bug that we do that, and that should be fixed to, but
fixing a graph algorithm to not infinite loop on self edges seems like
a reasonable thing to do in any case.
I don't have a minimized test case yet, and am submitting this without
one because it should be harmless and because I want it to get into
the release.1 parent fbc45aa commit c2c72da
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
560 | 564 | | |
561 | 565 | | |
562 | 566 | | |
| |||
0 commit comments