Jellevanderwerff / thebeat

thebeat: Rhythms in Python for science
https://thebeat.readthedocs.io
GNU General Public License v3.0
19 stars 1 forks source link

Better type checking using the numbers module #12

Open Jellevanderwerff opened 1 year ago

Jellevanderwerff commented 1 year ago

Sometimes input validation is done using e.g. isinstance(input, (int, float, np.float64)) etc. Better change this to use the numbers module, e.g. isinstance(input, Integral)

YannickJadoul commented 1 year ago

Should be numbers.Real, to cover float and not just int

Jellevanderwerff commented 9 months ago

Let's reconsider this once we consider integrating mypy