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
However, then bus.channel is unknown because it is not defined in can.bus.BusABC, but channel is a defined and used attributed in subclasses such as KvaserBus and SocketcanBus. Is there a more specific type that can be used, or something that exposes the channel argument provided when instantiating a CAN bus?
The text was updated successfully, but these errors were encountered:
Yeah, generally I'd rather avoid conditionals to appease Mypy/Pylance, etc. I skimmed through the code and it does seem like BusABC should have channel and that member value could be instantiated by each interface implementation? Only hiccup is that it seems like each implementation could have a different type for channel, e.g. SocketCAN expects channel is a str while Kvaser expects channel is an int.
Currently instantiating a bus looks something like:
However, then
bus.channel
is unknown because it is not defined incan.bus.BusABC
, butchannel
is a defined and used attributed in subclasses such asKvaserBus
andSocketcanBus
. Is there a more specific type that can be used, or something that exposes thechannel
argument provided when instantiating a CAN bus?The text was updated successfully, but these errors were encountered: