scienxlab / redflag

Safety net for machine learning pipelines. Plays nice with sklearn and pandas.
https://scienxlab.org/redflag
Apache License 2.0
22 stars 6 forks source link

Fix mypy errors #21

Open kwinkunks opened 1 year ago

kwinkunks commented 1 year ago

There's a lot of stuff I don't understand about mypy. So there are quite a few errors... I could use help fixing them if anyone has experience with it.

nkilm commented 1 year ago

We are getting the warnings because of this configuration https://github.com/agilescientific/redflag/blob/31a60435959c9c4de667edf71ee13d67cdce2a60/pyproject.toml#L15

When I ran mypy locally I got warnings like this, I don't see any mistake in the functions return type.

image

Return type is matching but still mypy gives the error, so changing the configuration might help.

image


Similar issue on mypy GitHub page, https://github.com/python/mypy/issues/5697