ITADN

[FEATURE] Better type information about `Paths` returned by `compute_paths`

#348Openjeertmans 创建于 2025-11-19
enhancementneeds-triage
J
jeertmanscommented
### Terms - [x] Checked the [existing issues](https://github.com/jeertmans/DiffeRT/issues?q=is%3Aissue+label%3Aenhancement) to see if my suggestion has not already been suggested; ### Description The `Paths` class hold many optional attributes, like `Paths.mask`. However, methods like `compute_paths` will always populate the `Paths.mask` attribute, or `Paths.confidence` attribute when `smoothing_factor` is not `None`. I think that providing this information in the return type hint could improve the user experience, by avoiding the need to show the type checker that `Paths.mask` exists. Using generics could be a solution. ### Screenshots _No response_ ### Additional information _No response_
0 条评论