ganehag / pyMeterBus

Pure Python implementation of the Meter-Bus (M-Bus EN13757-3) protocol.
BSD 3-Clause "New" or "Revised" License
78 stars 40 forks source link

add google doc strings and type hints to code #30

Open WolfgangFahl opened 6 months ago

WolfgangFahl commented 6 months ago

ChatGPT4 will happily assist in this e.g.

def serial_send(ser: serial.Serial, data: bytes = None, read_echo: bool = False) -> None:
    """
    Sends data through the serial interface and optionally reads echo.

    :param ser: Serial port instance.
    :param data: Data to be sent as bytes.
    :param read_echo: Flag to determine if the echo should be read.
    """