Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly refactor float_factory (for mypy) #315

Open
Funth0mas opened this issue Mar 3, 2019 · 0 comments
Open

Slightly refactor float_factory (for mypy) #315

Funth0mas opened this issue Mar 3, 2019 · 0 comments
Milestone

Comments

@Funth0mas
Copy link
Contributor

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?

@Funth0mas Funth0mas changed the title Slightly refactor float_factory Slightly refactor float_factory (for mypy) Mar 3, 2019
@ebroecker ebroecker added this to the 0.8 milestone Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants