ansible / molecule

Molecule aids in the development and testing of Ansible content: collections, playbooks and roles
https://ansible.readthedocs.io/projects/molecule/
MIT License
3.89k stars 664 forks source link

Document and hint logger.py #4305

Closed Qalthos closed 1 month ago

Qalthos commented 1 month ago

The decorators are a bit more complex here than in state.py, so we need a slightly more complicated hint.

Ideally, we would be able to use Callable[Concatenate[HasConfig, P], R] and not have to fish the HasConfig out of args, but there are some complicated issues with wrapped functions (see https://github.com/python/typeshed/issues/10653 for more context):

error: Incompatible return value type (got "_Wrapped[[HasConfig, **P], R, [HasConfig, **P], R]", expected "Callable[[HasConfig, **P], R]")  [return-value]