mobuchowski commented on PR #38155:
URL: https://github.com/apache/airflow/pull/38155#issuecomment-2044703627
@potiuk to make sure we fully understand: it means that when the plugin hook
gets called and your listener do not implement the argument, it does get
called, but just does not receive the particular argument
```python
import sys
from pluggy import PluginManager, HookspecMarker, HookimplMarker
hookspec = HookspecMarker("myproject")
hookimpl = HookimplMarker("myproject")
@hookspec
def myhook(config, arg):
pass
class Plugin1:
@hookimpl
def myhook(self, arg):
print("hook without config")
class Plugin2:
@hookimpl
def myhook(self, config, arg):
print("hook with config")
pm = PluginManager("myproject")
# load from the local module's namespace
pm.add_hookspecs(sys.modules[__name__])
pm.register(Plugin1())
pm.register(Plugin2())
pm.hook.myhook(config="config", arg="arg")
```
prints both
```
hook with config
hook without config
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]