Skip to content

Commit c383bf7

Browse files
igerberclaude
andcommitted
Fix P3 code review issues: unused import and type alias
- Remove unused `_generate_bootstrap_weights_batch` import from staggered.py - Move `PrecomputedData` type alias outside TYPE_CHECKING block in staggered_aggregation.py for runtime type hint accessibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4a6cadc commit c383bf7

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

diff_diff/staggered.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from diff_diff.staggered_bootstrap import (
2727
CSBootstrapResults,
2828
CallawaySantAnnaBootstrapMixin,
29-
_generate_bootstrap_weights_batch,
3029
)
3130
from diff_diff.staggered_aggregation import (
3231
CallawaySantAnnaAggregationMixin,

diff_diff/staggered_aggregation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
group-time average treatment effects into summary measures.
66
"""
77

8-
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING
8+
from typing import Any, Dict, List, Optional, Set, Tuple
99

1010
import numpy as np
1111
import pandas as pd
@@ -15,9 +15,8 @@
1515
compute_p_value,
1616
)
1717

18-
if TYPE_CHECKING:
19-
# PrecomputedData is a Dict[str, Any], but we define the alias here for clarity
20-
PrecomputedData = Dict[str, Any]
18+
# Type alias for pre-computed structures (defined at module scope for runtime access)
19+
PrecomputedData = Dict[str, Any]
2120

2221

2322
class CallawaySantAnnaAggregationMixin:

0 commit comments

Comments
 (0)