Bart, > -----Original Message----- > From: Bartosz Golaszewski <brgl@xxxxxxxx> > Sent: Tuesday, October 8, 2024 6:24 AM > To: Vincent Fazio <vfazio@xxxxxxxxxxx> > Cc: linux-gpio@xxxxxxxxxxxxxxx; vfazio@xxxxxxxxx > Subject: [External] - Re: [libgpiod][PATCH 02/22] bindings: python: make > internal a private submodule > > On Fri, Sep 27, 2024 at 9:05 PM Vincent Fazio <vfazio@xxxxxxxxxxx> wrote: > > > > The internal submodule shouldn't be exposed as part of the public > > interface, so mark it private following PEP 8 convention [0]. > > > > Also, add a type annotation to `sec` for its possible types. > > > > [0]: https://peps.python.org/pep-0008/#public-and-internal-interfaces > > Signed-off-by: Vincent Fazio <vfazio@xxxxxxxxxxx> > > --- > > bindings/python/gpiod/{internal.py => _internal.py} | 1 + > > bindings/python/gpiod/chip.py | 2 +- > > bindings/python/gpiod/line_request.py | 2 +- > > 3 files changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/bindings/python/gpiod/internal.py > > b/bindings/python/gpiod/_internal.py > > similarity index 94% > > rename from bindings/python/gpiod/internal.py rename to > > bindings/python/gpiod/_internal.py > > index > > > d1e95e4ade3146f596643d52207b367e332e6f7e..c9b5d2850389d5314a12 > bf6d1517 > > 74a96469a085 100644 > > --- a/bindings/python/gpiod/internal.py > > +++ b/bindings/python/gpiod/_internal.py > > @@ -9,6 +9,7 @@ __all__ = ["poll_fd"] > > > > > > def poll_fd(fd: int, timeout: Optional[Union[timedelta, float]] = None) -> > bool: > > + sec: Union[float, None] > > This has nothing to do with marking internal as private. Can this be a separate > commit? Absolutely. I was being lazy since I didn't touch this file subsequently so threw it into this commit. > > Otherwise, looks good. > > Bart > > > if isinstance(timeout, timedelta): > > sec = timeout.total_seconds() > > else: > > diff --git a/bindings/python/gpiod/chip.py > > b/bindings/python/gpiod/chip.py index > > > 257a31eba8d19634fd14e3b1d33a1345a0363946..1a1bba4d6dd9e840a603 > 94f1b749 > > 03f6ad15a0f4 100644 > > --- a/bindings/python/gpiod/chip.py > > +++ b/bindings/python/gpiod/chip.py > > @@ -7,10 +7,10 @@ from errno import ENOENT from typing import > > Optional, Union > > > > from . import _ext > > +from ._internal import poll_fd > > from .chip_info import ChipInfo > > from .exception import ChipClosedError from .info_event import > > InfoEvent -from .internal import poll_fd from .line import Value > > from .line_info import LineInfo from .line_request import LineRequest > > diff --git a/bindings/python/gpiod/line_request.py > > b/bindings/python/gpiod/line_request.py > > index > > > e48830450dcb5b7fa6c7983a0fe074cd9bd32ab7..154174872e488fa478b27f > 5e83d6 > > 5e6040aca367 100644 > > --- a/bindings/python/gpiod/line_request.py > > +++ b/bindings/python/gpiod/line_request.py > > @@ -6,9 +6,9 @@ from datetime import timedelta from typing import > > Optional, Union > > > > from . import _ext > > +from ._internal import poll_fd > > from .edge_event import EdgeEvent > > from .exception import RequestReleasedError -from .internal import > > poll_fd from .line import Value from .line_settings import > > LineSettings, _line_settings_to_ext > > > > > > -- > > 2.34.1 > > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe.