You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that we can setup mypy on CI we need to elliminate all errors. Currently all serious mypy errors are in canmatrix.canmatrix and most of them are bound to float_factory playing with attrs.
The problem is, that mypy currently only undertsand attr converters, if they are named functions. That means NEITHER converter=decimal.Decimal NOR converter=CanId.from_compound_integer.
Hopefully we could add named 'helper' function (say convert_to_float(x: Any) -> Any)to satisfy mypy, but the question is - do every Signal needs its own converter? Wouldn't be single module-level converter enough?
The text was updated successfully, but these errors were encountered:
Funth0mas
changed the title
Slightly refactor float_factory
Slightly refactor float_factory (for mypy)
Mar 3, 2019
So that we can setup
mypy
on CI we need to elliminate all errors. Currently all serious mypy errors are incanmatrix.canmatrix
and most of them are bound tofloat_factory
playing withattrs
.The problem is, that mypy currently only undertsand attr converters, if they are named functions. That means NEITHER
converter=decimal.Decimal
NORconverter=CanId.from_compound_integer
.Hopefully we could add named 'helper' function (say
convert_to_float(x: Any) -> Any
)to satisfy mypy, but the question is - do every Signal needs its own converter? Wouldn't be single module-level converter enough?The text was updated successfully, but these errors were encountered: