Wykres commitów

9 Commity (852f2cceff9f35ecf59db303400b8cd8e63dbc1d)

Autor SHA1 Wiadomość Data
Damien George 852f2cceff inspect: Support closures/generators/async-funcs in inspect.signature.
This is a follow-up to b4565b41ea (PR #1043),
to support closures, async functions and generators in `inspect.signature`.

Signed-off-by: Damien George <damien@micropython.org>
2025-11-24 13:03:03 +11:00
Damien George b4565b41ea inspect: Implement a very basic signature function.
This implements a very basic `inspect.signature()` function.

At the moment it returns only a simple `Signature` instance with a
`parameters` attribute that holds an `OrderedDict` whose length matches the
arity of the input function (the number of arguments it takes).

So, the following code works and is compatible with CPython:

    def f(a, b, *, c):
        pass

    print(len(inspect.signature(f).parameters))

That should print 3.

Signed-off-by: Damien George <damien@micropython.org>
2025-10-02 00:07:34 +10:00
Damien George 5b496e944e inspect: Implement iscoroutinefunction and iscoroutine.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-14 10:26:38 +10:00
Damien George 2665047fa7 inspect: Add basic unit tests.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-14 10:26:38 +10:00
Damien George 48bf3a74a8 inspect: Fix isgenerator logic.
Also optimise both `isgenerator()` and `isgeneratorfunction()` so they use
the same lambda, and don't have to create it each time they are called.

Fixes issue #997.

Signed-off-by: Damien George <damien@micropython.org>
2025-04-14 10:26:38 +10:00
Jim Mussared ce66e701a5 all: Replace metadata.txt with manifest.py.
Uses the new require()/package()/module() functions from manifestfile.py.

Add manifest.py for iperf3 and pyjwt.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:28 +10:00
Jim Mussared ecef7a506c all: Remove all setup.py files.
These are unused and will be replaced with manifest.py.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:11 +10:00
Jim Mussared fa13cbbc8b all: Run black over all code.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-05-27 15:50:04 +10:00
Jim Mussared 1a28fe84e8 top: Move modules into python-stdlib, unix-ffi, or micropython. 2021-05-27 15:41:08 +10:00