ImagingDataCommons / highdicom

High-level DICOM abstractions for the Python programming language
https://highdicom.readthedocs.io
MIT License
162 stars 34 forks source link

Remove redundant cast #260

Closed DimitriPapadopoulos closed 9 months ago

DimitriPapadopoulos commented 9 months ago

Casting a variable to its type hint seems redundant, although it can be seen as defensive programming.

CPBridge commented 9 months ago

This is done for the purpose of static analysis tools such as mypy. We used to have mypy as part of our CI/CD checks until changes in pydicom created so many issues that it became untenable. At some point though we hope to return to including these checks so I'm going to keep this here.