@@ -60,23 +60,31 @@ def __call__(self, step: StepHandler) -> None:
60
60
We will strive to provide both types in examples.
61
61
"""
62
62
63
- __call__ : Callable [..., None ]
64
- """
65
- The method to run when the :term:`step` is invoked.
63
+ # XXX: pylint will complain about the *args/**kwargs with 'arguments-differ'
64
+ # However, this is the canonical way mypy does for callback protocols
65
+ # that can accept any kind of parameters.
66
+ # To avoid the issue, you can also not inherit from 'Step', all the
67
+ # type checking should still work.
68
+ #
69
+ # See https://github.com/python/mypy/issues/5876.
70
+ #
71
+ def __call__ (self , * args : Any , ** kwargs : Any ) -> None :
72
+ """
73
+ The method to run when the :term:`step` is invoked.
66
74
67
- :Parameters:
75
+ :Parameters:
68
76
69
- It can take any amount of parameters, that can be passed by keyword, so
70
- positional only arguments are not supported.
77
+ It can take any amount of parameters, that can be passed by keyword, so
78
+ positional only arguments are not supported.
71
79
72
- Parameters will then be passed using parametrization, with a few specific
73
- parameters being reserved by the system. Namely:
80
+ Parameters will then be passed using parametrization, with a few specific
81
+ parameters being reserved by the system. Namely:
74
82
75
- - ``step``, which is used to pass the :py:class:`StepHandler`.
83
+ - ``step``, which is used to pass the :py:class:`StepHandler`.
76
84
77
- For passing other arguments, see :py:func:`dwas.parametrize` and
78
- :py:func:`dwas.set_defaults`.
79
- """
85
+ For passing other arguments, see :py:func:`dwas.parametrize` and
86
+ :py:func:`dwas.set_defaults`.
87
+ """
80
88
81
89
82
90
@runtime_checkable
0 commit comments