3
0
Fork 0

fix: fix 'inconsistent-return-statements' for pylint

This commit is contained in:
Lance Edgar 2025-08-30 16:36:52 -05:00
parent 4f6229e5d9
commit 2fcff6b2a4
16 changed files with 43 additions and 9 deletions

View file

@ -27,6 +27,10 @@ else:
batch = MyBatch(id=42, uuid=_uuid.UUID('0675cdac-ffc9-7690-8000-6023de1c8cfd'))
self.assertEqual(repr(batch), "MyBatch(uuid=UUID('0675cdac-ffc9-7690-8000-6023de1c8cfd'))")
self.assertEqual(str(batch), "00000042")
self.assertEqual(batch.id_str, "00000042")
batch2 = MyBatch()
self.assertIsNone(batch2.id_str)
class TestBatchRowMixin(DataTestCase):

View file

@ -22,9 +22,11 @@ else:
def test_dict_behavior(self):
setting = Setting()
self.assertEqual(list(iter(setting)), [('name', None), ('value', None)])
self.assertIsNone(setting.name)
self.assertIsNone(setting['name'])
setting.name = 'foo'
self.assertEqual(setting['name'], 'foo')
self.assertRaises(KeyError, lambda: setting['notfound'])
class TestUUID(TestCase):