Skip to content

Commit c8ab3db

Browse files
fix: resolve mypy type errors in imputation and mimic_iii
- Assert time_col is not None in _fill_with_gap_mask to narrow str|None - Annotate read_kwargs as dict[str, object] to satisfy type-arg check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 38099cb commit c8ab3db

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

clinops/ingest/mimic_iii.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def _load(self, table_name: str) -> pd.DataFrame:
553553
path = self._resolve_path(table_name)
554554
logger.debug(f"Loading MIMIC-III {table_name} from {path}")
555555

556-
read_kwargs: dict = {}
556+
read_kwargs: dict[str, object] = {}
557557
if self._cfg.chunk_size and table_name in {"chartevents", "labevents"}:
558558
read_kwargs["chunksize"] = self._cfg.chunk_size
559559

clinops/temporal/imputation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def _fill_with_gap_mask(
210210
entity group, preventing values from propagating across entity
211211
boundaries (e.g. across patients or admissions).
212212
"""
213+
assert self.time_col is not None # callers guard this
213214
if self.id_col and self.id_col in df.columns:
214215
parts = []
215216
for _, grp in df.groupby(self.id_col, sort=False):

0 commit comments

Comments
 (0)