NeuroTechX / EEG-ExPy

EEG Experiments in Python
https://neurotechx.github.io/EEG-ExPy/
BSD 3-Clause "New" or "Revised" License
437 stars 124 forks source link

ci: added typechecking with mypy #72

Closed ErikBjare closed 3 years ago

ErikBjare commented 3 years ago

CI should fail until I fix the current typing issues.

ErikBjare commented 3 years ago

I disabled the --check-untyped-defs for now so it can be merged.

I'll look into fixing the type issues for untyped defs in a later PR.

ErikBjare commented 3 years ago

Those errors are warranted, and indeed look like they would cause actual errors at runtime. mypy did its job here, and told us that the code wouldn't run without us having to run/test it.

Looks like it expects all functions to be written according to the mypy syntax

That's not the issue (it doesn't require you to annotate everything), and there isn't a "mypy syntax" per se, it's just plain Python 3 (see this SO answer of mine for some background and benefits).

I can submit a PR, should be a trivial fix.

Edit: Pushed and merged in https://github.com/NeuroTechX/eeg-notebooks/pull/82