This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Use casts to improve type checking for MockConsole #322
Labels
good first issue
Good for newcomers
testing
Test coverage.
typing
A incorrect or loose type that needs correcting.
Milestone
I'm guessing
type: ignore
is needed here because the typechecker doesn't know thatbackend._console
is aMockConsole
rather than the more generalConsole
. Could we instead pull out the console into a local variable using a cast and refer to it directly?Even better, could we refactor so that the console object is created in this function and passed into the
ArduinoUnoConsoleBackend
constructor, rather than being created inside the constructor and having to be pulled out of a private attribute?Originally posted by @kierdavis in https://github.com/j5api/j5/pull/306/files
The text was updated successfully, but these errors were encountered: