On Tue, Dec 10, 2024 at 03:21:29PM +0100, Bartosz Golaszewski wrote: > On Tue, Dec 10, 2024 at 3:17 PM Vincent Fazio <vfazio@xxxxxxxxxxx> wrote: > > > > > > > > @@ -131,6 +132,23 @@ class WatchingInfoEventWorks(TestCase): > > > self.assertGreater(ts_rel, ts_rec) > > > self.assertGreater(ts_rec, ts_req) > > > > > > + def test_select_chip_object(self): > > > > Nit: > > > > def test_select_chip_object(self) -> None: > > > > These fail `mypy --strict` otherwise. These are optional checks so I'll leave it up to you to decide if you want to implement them. > > > > Ah! This is why I didn't see it, I missed the --strict switch. Thanks. > > On an unrelated note: mypy --strict is giving me this: > > bindings/python/gpiod/line.py:19: error: Non-overlapping equality > check (left operand type: "Value", right operand type: "int") > [comparison-overlap] > > for: > > 18 def __bool__(self) -> bool: > 19 return self == self.ACTIVE > > How do I fix it? > How about this: def __bool__(self) -> bool: return self.value == _ext.VALUE_ACTIVE ? Granted that is a workaround and your original code should be fine, but it does get rid of the warning... Cheers, Kent.