Skip to content

Commit 113ca4e

Browse files
authored
Merge pull request #1279 from hardbyte/felixdivo-update-black
Update the black formatter to stable release
2 parents b92ee5a + ae0bc17 commit 113ca4e

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

can/interfaces/socketcan/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858

5959
CANFD_MTU = 72
6060

61-
STD_ACCEPTANCE_MASK_ALL_BITS = 2 ** 11 - 1
61+
STD_ACCEPTANCE_MASK_ALL_BITS = 2**11 - 1
6262
MAX_11_BIT_ID = STD_ACCEPTANCE_MASK_ALL_BITS
6363

64-
EXT_ACCEPTANCE_MASK_ALL_BITS = 2 ** 29 - 1
64+
EXT_ACCEPTANCE_MASK_ALL_BITS = 2**29 - 1
6565
MAX_29_BIT_ID = EXT_ACCEPTANCE_MASK_ALL_BITS

can/interfaces/socketcan/socketcan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def _send_periodic_internal(
829829

830830
def _get_next_task_id(self) -> int:
831831
with self._task_id_guard:
832-
self._task_id = (self._task_id + 1) % (2 ** 32 - 1)
832+
self._task_id = (self._task_id + 1) % (2**32 - 1)
833833
return self._task_id
834834

835835
def _get_bcm_socket(self, channel: str) -> socket.socket:

can/interfaces/systec/ucan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def check_result(result, func, arguments):
120120

121121
try:
122122
# Select the proper dll architecture
123-
lib = WinDLL("usbcan64.dll" if sys.maxsize > 2 ** 32 else "usbcan32.dll")
123+
lib = WinDLL("usbcan64.dll" if sys.maxsize > 2**32 else "usbcan32.dll")
124124

125125
# BOOL PUBLIC UcanSetDebugMode (DWORD dwDbgLevel_p, _TCHAR* pszFilePathName_p, DWORD dwFlags_p);
126126
UcanSetDebugMode = lib.UcanSetDebugMode

can/interfaces/vector/canlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(
8282
poll_interval: float = 0.01,
8383
receive_own_messages: bool = False,
8484
bitrate: Optional[int] = None,
85-
rx_queue_size: int = 2 ** 14,
85+
rx_queue_size: int = 2**14,
8686
app_name: Optional[str] = "CANalyzer",
8787
serial: Optional[int] = None,
8888
fd: bool = False,

requirements-lint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pylint==2.12.2
2-
black==21.12b0
2+
black~=22.1.0
33
mypy==0.931
44
mypy-extensions==0.4.3
55
types-setuptools

test/data/example_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def generate_message(arbitration_id):
179179
Generates a new message with the given ID, some random data
180180
and a non-extended ID.
181181
"""
182-
data = bytearray([random.randrange(0, 2 ** 8 - 1) for _ in range(8)])
182+
data = bytearray([random.randrange(0, 2**8 - 1) for _ in range(8)])
183183
return Message(
184184
arbitration_id=arbitration_id,
185185
data=data,

test/network_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ControllerAreaNetworkTestCase(unittest.TestCase):
3838

3939
ids = list(range(num_messages))
4040
data = list(
41-
bytearray([random.randrange(0, 2 ** 8 - 1) for a in range(random.randrange(9))])
41+
bytearray([random.randrange(0, 2**8 - 1) for a in range(random.randrange(9))])
4242
for b in range(num_messages)
4343
)
4444

0 commit comments

Comments
 (0)