Commit fefafc5
committed
Don't pass blindly what comes from the API to
Since now we have an internal `Fuse` type that uses quantities to avoid
bugs, we need to make sure to properly convert between the client's
`Fuse` type and the internal one.
There is also actually a bug in the old code, as the conversion to
`Current` never happened. This was never caught by `mypy` because we
were using the `**args` syntax to create the object, so there is no
type checking of the arguments, so a bad `Fuse` was being created, with
a `float` `max_current` instead of using `Current`.
We now make sure the conversion is done appropriately.
Signed-off-by: Leandro Lucarella <[email protected]>Fuse
1 parent 991ae71 commit fefafc5
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
0 commit comments