> -----Original Message----- > From: Vincent Fazio > Sent: Tuesday, December 10, 2024 8:27 AM > To: Bartosz Golaszewski <brgl@xxxxxxxx> > Cc: Kent Gibson <warthog618@xxxxxxxxx>; Linus Walleij > <linus.walleij@xxxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx; Bartosz Golaszewski > <bartosz.golaszewski@xxxxxxxxxx> > Subject: Re: [PATCH libgpiod] bindings: python: provide fileno() for Chip and > LineRequest > > > > > -----Original Message----- > > 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? > > This is odd, because I specifically ignore this: > https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/bindings/python > /pyproject.toml#n57 > > How do you have this set up? If you're doing this outside of the bindings/python directory, try specifying the config file: ``` (xtf-py3.12) vfazio@vfazio4 ~/development/libgpiod $ mypy --config-file=bindings/python/pyproject.toml --strict bindings/python/gpiod Success: no issues found in 13 source files ``` However, if you run it on `bindings/python` the output will be noisy because it's not limiting itself to the "files" section within the mypy settings. I wrote the pyproject settings with the unwritten rule that the checks would be rooted within `bindings/python` and not outside of it. We should probably document our expectations for how these checks are run and then update the config file to respect those expectations.