You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't do what it seems, so I'd say it's good that it raises an error. The extra dict is intended to be passed by **kwargs, so this won't work with a sink configured to use extra[queue]. (Although the error doesn't exactly tell you all that)
The real problem though is that it will tell you the same for
logger.info(
'Booting up worker',
queue=queue_name,
)
But I think I've already touched on that somewhere that I can't find again at this time.
Technically it's correct code. Basically, I would never consider this a error within Loguru.
However, it may be interesting to warn Mypy users about possible misuse. Most of the time, it's indeed a mistake. Especially for people migrating from standard logging. As long as it's possible to disable the warning for the theoretically valid use case, it seems to be a good catch in general.
Consider following piece of code:
It is obviously flagged as:
The text was updated successfully, but these errors were encountered: