Skip to content

Commit 250563c

Browse files
committed
Remove unused comment and add methods _detect_available_configs and fileno to make pylint happy
1 parent 1b27d43 commit 250563c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

can/interfaces/neousys/neousys.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,6 @@ def __init__(self, channel, device=0, bitrate=500000, **kwargs):
157157
bitrate, NEOUSYS_CAN_MSG_USE_ID_FILTER, 0, 0
158158
)
159159

160-
# These can be needed in some old 2.x consepts not needed in 3.6 though
161-
# self.canlib.CAN_RegisterReceived.argtypes = [c_uint, NEOUSYS_CAN_MSG_CALLBACK]
162-
# self.canlib.CAN_RegisterReceived.restype = c_int
163-
# self.canlib.CAN_RegisterStatus.argtypes = [c_uint, NEOUSYS_CAN_STATUS_CALLBACK]
164-
# self.canlib.CAN_RegisterStatus.restype = c_int
165-
166160
self._neousys_recv_cb = NEOUSYS_CAN_MSG_CALLBACK(self._neousys_recv_cb)
167161
self._neousys_status_cb = NEOUSYS_CAN_STATUS_CALLBACK(
168162
self._neousys_status_cb
@@ -261,3 +255,15 @@ def _neousys_status_cb(self, status):
261255
def shutdown(self):
262256
if self.canlib is not None:
263257
self.canlib.CAN_Stop(self.channel)
258+
259+
def fileno(self):
260+
# Return an invalid file descriptor as not used
261+
return -1
262+
263+
@staticmethod
264+
def _detect_available_configs():
265+
channels = []
266+
267+
# There is only one channel
268+
channels.append({"interface": "neousys", "channel": 0})
269+
return channels

0 commit comments

Comments
 (0)