Re: [libgpiod][PATCH] bindings: python: fix __repr__() implementations

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

 



On Fri, Feb 2, 2024 at 2:08 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
>
> The __repr__() function should - if possible - return a valid Python
> expression that can be used to instantiate a new object when evaluated.
>
> LineSettings.__repr__() is missing comas between arguments. Both Chip and
> LineSettings also don't prefix the returned string with 'gpiod.'. Fix
> both functions and add more test cases - including actually using the
> strings returned by __repr__() to create new objects and compare their
> contents.
>
> Reported-by: Robert Thomas <rob.thomas@xxxxxxxxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> ---

Patch applied.

Bart





[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