On Fri, Sep 27, 2024 at 9:05 PM Vincent Fazio <vfazio@xxxxxxxxxxx> wrote: > > This patch series employs mypy [0] and ruff [1] to ensure the gpiod > library has correctly typed public interfaces, is performing proper type > checking internally, is consistently formatted in a standard code style > that targets Python 3.9 syntax, and passes a subset of linting checks. > > Patches 1 and 2 remove unused imports, sort the remainder, and ensure > the publicly usable classes are available from the gpiod base module. > > Patches 3 and 4 fix and add annotations to the gpiod bindings. > > Patches 5-13 fix type and lint errors internal to the bindings. > > Patch 14 fixes a duplicate test name identified by the linter. > > Patch 15 and 16 remove unused imports, sort the remainder, and fix lint > errors related to a shadowed export. > > Patches 17 and 18 fix and add annotations to the test gpiod bindings. > > Patches 19-21 fix type and lint errors internal to the tests. > > Patch 22 adds mypy and ruff configuration to pyproject.toml and adds > documentation to the readme so future patches can be evaluated against a > standard set of rules. > > There should be no functional changes that impact existing code as part > of this series. > > All unit tests continue to pass without changes and code coverage has > not changed. > > After this series is applied, the public type annotations will reflect > the argument expectations of the class methods so consumers can type > check their code against the gpiod type annotations. > > [0]: https://mypy.readthedocs.io/en/stable/ > [1]: https://docs.astral.sh/ruff/ > > Signed-off-by: Vincent Fazio <vfazio@xxxxxxxxxxx> > --- Phew! Nice work! My main concern is the lack of proper commit messages which makes some of the changes confusing to me - an intermediate python developer. I added some other requests, some commits will need splitting into two but overall this looks nice and I'll be happy to pick it up. Bart