Commit 275f508
authored
Clarification on non-Module roots (#2536)
* remove last instances of Unknown parents (and None parents in tests)
It's a part of the campaign to get rid of non-module roots
* assert that the root() is always a Module
The nodes are often created in an ad-hoc way, and their parent is not
always set. We can't control for that invariant fully in the
constructor, since the parent is sometimes set outside of the
constructor. The previous commits did their best to clean up such
situations, but let's add an assert just in case.1 parent d3df248 commit 275f508
File tree
9 files changed
+21
-21
lines changed- astroid
- brain
- nodes
- scoped_nodes
- tests
9 files changed
+21
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
335 | | - | |
| 334 | + | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
1603 | 1602 | | |
1604 | 1603 | | |
1605 | 1604 | | |
1606 | | - | |
| 1605 | + | |
1607 | 1606 | | |
1608 | 1607 | | |
1609 | 1608 | | |
| |||
2037 | 2036 | | |
2038 | 2037 | | |
2039 | 2038 | | |
2040 | | - | |
| 2039 | + | |
2041 | 2040 | | |
2042 | 2041 | | |
2043 | 2042 | | |
| |||
2071 | 2070 | | |
2072 | 2071 | | |
2073 | 2072 | | |
2074 | | - | |
2075 | 2073 | | |
2076 | 2074 | | |
2077 | 2075 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | | - | |
676 | 675 | | |
677 | 676 | | |
678 | 677 | | |
| |||
707 | 706 | | |
708 | 707 | | |
709 | 708 | | |
710 | | - | |
| 709 | + | |
711 | 710 | | |
712 | | - | |
713 | 711 | | |
714 | 712 | | |
715 | 713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
1960 | 1961 | | |
1961 | 1962 | | |
1962 | 1963 | | |
1963 | | - | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
1964 | 1967 | | |
1965 | 1968 | | |
1966 | 1969 | | |
| |||
0 commit comments