Re: [PATCH libgpiod] bindings: python: provide fileno() for Chip and LineRequest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----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?

I run mypy checks from a virtual environment within bindings/python/ and this is not failing for me right now:

```
(venv) vfazio@vfazio4 ~/development/libgpiod/bindings/python $ mypy --strict
tests/tests_info_event.py:135: error: Function is missing a return type annotation  [no-untyped-def]
tests/tests_info_event.py:135: note: Use "-> None" if function does not return a value
tests/tests_edge_event.py:225: error: Function is missing a return type annotation  [no-untyped-def]
tests/tests_edge_event.py:225: note: Use "-> None" if function does not return a value
Found 2 errors in 2 files (checked 30 source files)
```

I can look into other ways to try to suppress this if necessary, like by adding an explicit ignore in the file itself.




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux