Skip to content

Commit 6f361c2

Browse files
committed
fix problem with keyword-arg-before-vararg
1 parent 527f715 commit 6f361c2

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

.pylintrc-wip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ disable=invalid-name,
101101
unused-argument,
102102
abstract-method,
103103
attribute-defined-outside-init,
104-
protected-access
104+
protected-access,
105+
keyword-arg-before-vararg
105106

106107
# Enable the message, report, category or checker with the given id(s). You can
107108
# either give multiple identifier separated by comma (,) or put this option

can/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Bus(BusABC): # pylint disable=abstract-method
6161
"""
6262

6363
@staticmethod
64-
def __new__(cls, *args, channel=None, **kwargs):
64+
def __new__(cls, channel=None, *args, **kwargs):
6565
"""
6666
Takes the same arguments as :class:`can.BusABC.__init__`.
6767
Some might have a special meaning, see below.

can/interfaces/pcan/pcan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
class PcanBus(BusABC):
6262

63-
def __init__(self, *args, channel='PCAN_USBBUS1', state=BusState.ACTIVE, bitrate=500000,
63+
def __init__(self, channel='PCAN_USBBUS1', state=BusState.ACTIVE, bitrate=500000, *args,
6464
**kwargs):
6565
"""A PCAN USB interface to CAN.
6666

can/interfaces/serial/serial_can.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SerialBus(BusABC):
3131
3232
"""
3333

34-
def __init__(self, channel, *args, baudrate=115200, timeout=0.1, rtscts=False, **kwargs):
34+
def __init__(self, channel, baudrate=115200, timeout=0.1, rtscts=False, *args, **kwargs):
3535
"""
3636
:param str channel:
3737
The serial device to open. For example "/dev/ttyS1" or

can/interfaces/usb2can/usb2canInterface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Usb2canBus(BusABC):
8383
8484
"""
8585

86-
def __init__(self, *args, channel=None, dll="usb2can.dll", flags=0x00000008,
86+
def __init__(self, channel=None, dll="usb2can.dll", flags=0x00000008, *args,
8787
bitrate=500000, **kwargs):
8888

8989
self.can = Usb2CanAbstractionLayer(dll)

can/thread_safe_bus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ def __init__(self, *args, **kwargs):
6464
self._lock_send = RLock()
6565
self._lock_recv = RLock()
6666

67-
def recv(self, *args, timeout=None, **kwargs):
67+
def recv(self, timeout=None, *args, **kwargs):
6868
with self._lock_recv:
6969
return self.__wrapped__.recv(timeout=timeout, *args, **kwargs)
7070

71-
def send(self, msg, *args, timeout=None, **kwargs):
71+
def send(self, msg, timeout=None, *args, **kwargs):
7272
with self._lock_send:
7373
return self.__wrapped__.send(msg, timeout=timeout, *args, **kwargs)
7474

@@ -85,7 +85,7 @@ def filters(self, filters):
8585
with self._lock_recv:
8686
self.__wrapped__.filters = filters
8787

88-
def set_filters(self, *args, filters=None, **kwargs):
88+
def set_filters(self, filters=None, *args, **kwargs):
8989
with self._lock_recv:
9090
return self.__wrapped__.set_filters(filters=filters, *args, **kwargs)
9191

0 commit comments

Comments
 (0)