Commit 6f49201
Fix import expansion: keep full module paths, expand relative aliases
P1: parse_imports() no longer truncates to 2 components. Full module paths
like diff_diff.visualization._common are preserved. For 'from . import foo'
style relative imports, each alias is appended to the resolved base package
(e.g., diff_diff.visualization._event_study instead of diff_diff.visualization).
P2: Add 3 regression tests: submodule import truncation check,
relative import alias expansion, visualization __init__.py expansion
includes submodule files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a354a2f commit 6f49201
2 files changed
Lines changed: 50 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 246 | + | |
| 247 | + | |
251 | 248 | | |
252 | 249 | | |
253 | 250 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 251 | + | |
| 252 | + | |
258 | 253 | | |
259 | | - | |
| 254 | + | |
260 | 255 | | |
261 | 256 | | |
262 | 257 | | |
263 | 258 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
545 | 571 | | |
546 | 572 | | |
547 | 573 | | |
| |||
583 | 609 | | |
584 | 610 | | |
585 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
586 | 624 | | |
587 | 625 | | |
588 | 626 | | |
| |||
0 commit comments