Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
166 stars 14 forks source link

improve typing for 'underdocumented' `__init__` methods #465

Open Josverl opened 7 months ago

Josverl commented 7 months ago

often init is well documented , where init is not This is seen on multiple classess

for example _rp2.StateMachine

The constructor has minimal documentation rp2.StateMachine(id[, program, ...])

    def __init__(self, id, program, *args, **kwargs) -> None: ...

While the initfunction has ample documentation.

StateMachine.init(program, freq=-1, *, in_base=None, out_base=None, set_base=None, jmp_pin=None, sideset_base=None, in_shiftdir=None, out_shiftdir=None, push_thresh=None, pull_thresh=None)

    def init(
        self,
        program,
        freq=-1,
        *,
        in_base=None,
        out_base=None,
        set_base=None,
        jmp_pin=None,
        sideset_base=None,
        in_shiftdir=None,
        out_shiftdir=None,
        push_thresh=None,
        pull_thresh=None,
    ) -> None: