carnisj / bcdi

BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data
Other
23 stars 17 forks source link

Add Mypy for type checking in the workflows #184

Closed carnisj closed 3 years ago

carnisj commented 3 years ago

Description

People can start using type hinting when declaring functions, and this will be checked by mypy. I added a task in doit and also in the GitHub workflows. The good point is that it can be progressive, one does not have to implement type hinting for every functions or classes.

See https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html

It's a step forward for reliability.

Type of change

Checklist: