Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion can/interfaces/robotell.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
if not channel: # if None or empty
raise TypeError("Must specify a serial port.")
if "@" in channel:
(channel, ttyBaudrate) = channel.split("@")
channel, ttyBaudrate = channel.split("@")
self.serialPortOrig = serial.serial_for_url(
channel, baudrate=ttyBaudrate, rtscts=rtscts
)
Expand Down
2 changes: 1 addition & 1 deletion can/interfaces/slcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(
if not channel: # if None or empty
raise ValueError("Must specify a serial port.")
if "@" in channel:
(channel, baudrate) = channel.split("@")
channel, baudrate = channel.split("@")
tty_baudrate = int(baudrate)

with error_check(exception_type=CanInitializationError):
Expand Down
2 changes: 1 addition & 1 deletion can/interfaces/systec/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __eq__(self, other):
def id(self):
return self.m_dwID

@id.setter
@id.setter # noqa: A003
def id(self, value):
self.m_dwID = value

Expand Down
2 changes: 1 addition & 1 deletion can/interfaces/udp_multicast/bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def recv(
timestamp = seconds + nanoseconds * 1.0e-9
else:
# fetch data & source address
(raw_message_data, sender_address) = self._socket.recvfrom(
raw_message_data, sender_address = self._socket.recvfrom(
self.max_buffer
)

Expand Down
6 changes: 2 additions & 4 deletions can/io/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ def _create_db(file: StringPathLike, table_name: str) -> sqlite3.Connection:
conn = sqlite3.connect(file)

# create table structure
conn.cursor().execute(
f"""CREATE TABLE IF NOT EXISTS {table_name}
conn.cursor().execute(f"""CREATE TABLE IF NOT EXISTS {table_name}
(
ts REAL,
arbitration_id INTEGER,
Expand All @@ -188,8 +187,7 @@ def _create_db(file: StringPathLike, table_name: str) -> sqlite3.Connection:
error INTEGER,
dlc INTEGER,
data BLOB
)"""
)
)""")
conn.commit()

return conn
Expand Down
4 changes: 1 addition & 3 deletions can/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ def load_config(
[
given_config,
can.rc,
lambda _context: load_environment_config( # pylint: disable=unnecessary-lambda
_context
),
load_environment_config,
lambda _context: load_environment_config(),
lambda _context: load_file_config(path, _context),
lambda _context: load_file_config(path),
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ docs = [
]
lint = [
"pylint==4.0.*",
"ruff==0.14.*",
"black==25.12.*",
"ruff==0.15.*",
"black==26.1.*",
"mypy==1.19.*",
]
test = [
"pytest==9.0.*",
"pytest-timeout==2.4.*",
"pytest-modern==0.7.*;platform_system!='Windows'",
"coveralls==4.0.*",
"coveralls==4.1.*",
"pytest-cov==7.0.*",
"coverage==7.13.*",
"hypothesis==6.*",
Expand Down
1 change: 1 addition & 0 deletions test/listener_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

""" """

import asyncio
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions test/test_cyclic_socketcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
This module tests multiple message cyclic send tasks.
"""

import time
import unittest

Expand Down
1 change: 1 addition & 0 deletions test/test_neovi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

""" """

import pickle
import unittest

Expand Down
1 change: 1 addition & 0 deletions test/test_socketcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
Test functions in `can.interfaces.socketcan.socketcan`.
"""

import ctypes
import struct
import sys
Expand Down
1 change: 1 addition & 0 deletions test/test_socketcan_loopback.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
for a good explanation of why this might be needed:
https://www.kernel.org/doc/html/v4.17/networking/can.html#socketcan-local-loopback1
"""

import unittest

import can
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ commands =
[testenv:py314]
extras =
canalystii
serial
mf4
multicast
pywin32
serial
# still no windows-curses for py314

[testenv:{py313t,py314t,pypy310,pypy311}]
extras =
Expand Down