Skip to content

Commit

Permalink
fix errors raised by recent versions of ruff
Browse files Browse the repository at this point in the history
this makes the CI pass again.
  • Loading branch information
andlaus committed Aug 14, 2024
1 parent d8c0109 commit ce087f6
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

# General information about the project.
project = "cantools"
copyright = "2015-2023, Erik Moqvist"
project_copyright = "2015-2023, Erik Moqvist"
author = "Erik Moqvist"

# The version info for the project you're documenting, acts as replacement for
Expand Down
4 changes: 2 additions & 2 deletions src/cantools/database/can/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _objects_similar(a: Any,
tolerance: float,
include_format_specifics: bool) -> bool:

if type(a) != type(b):
if type(a) is not type(b):
# the types of the objects do not match
return False
elif a is None:
Expand Down Expand Up @@ -221,7 +221,7 @@ def _objects_similar(a: Any,
a_attrib = getattr(a, attrib_name)
b_attrib = getattr(b, attrib_name)

if type(a_attrib) != type(b_attrib):
if type(a_attrib) is not type(b_attrib):
return False
elif callable(a_attrib):
# ignore callable attributes
Expand Down
2 changes: 1 addition & 1 deletion tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,7 @@ def test_comments_hex_and_motorola_sym(self):

for i in range(8):
sig = msg2.signals[i]
self.assertEqual(sig.name, 'Test%s' % i)
self.assertEqual(sig.name, f'Test{i}')
self.assertEqual(sig.start, i*8 + 7)
self.assertEqual(sig.length, 8)
self.assertEqual(sig.receivers, [])
Expand Down
Loading

0 comments on commit ce087f6

Please sign in to comment.