Introduce mypy static type-checking#65
Conversation
Signed-off-by: Apostolos Georgiadis <apostolos.georgiadis@nfiniity.com>
Signed-off-by: Apostolos Georgiadis <apostolos.georgiadis@nfiniity.com>
Signed-off-by: Apostolos Georgiadis <apostolos.georgiadis@nfiniity.com>
|
One thing I would adjust before merging: the That makes cache misses look like valid fallback behavior, whereas they probably indicate an internal inconsistency. It also risks silently reintroducing per-sample parquet reads. I’d prefer to keep the stricter invariant: camera_timestamps = {
cam_name: self._camera_timestamps[(clip_uuid, cam_name)]
for cam_name in self.camera_names
}
and keep load_camera_frame(..., camera_timestamps: dict[str, np.ndarray] | None = None) with direct indexing when the cache dict is provided. |
Signed-off-by: Apostolos Georgiadis <apostolos.georgiadis@nfiniity.com>
thank you @riita10069 for your clarification.. reverted! |
Adds mypy static type-checking to the project and CI.
typecheckmake target (cd Model && mypy .), folded intomake ci.Config
Lenient by design so typing can be adopted incrementally:
ignore_missing_imports— uninstalled optional deps (osmnx, PIL, …) don't fail the build.follow_imports = silent— untyped legacy code doesn't block checking.So mypy only flags real type errors today; stricter per-module rules can be added later.