-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out possibility of tracking logger objects #6
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
kornicameister
added a commit
that referenced
this issue
Jun 24, 2020
Adds tracking mechanism for logger's `opt` method. Thanks to that it is now possible to detect bad calls to logger that are lazy and are expecting `t.Callable[[], t.Any]` Closes: #6
kornicameister
added a commit
that referenced
this issue
Jul 4, 2020
* Track if logger was lazy or not Adds tracking mechanism for logger's `opt` method. Thanks to that it is now possible to detect bad calls to logger that are lazy and are expecting `t.Callable[[], t.Any]` Closes: #6
ghost
removed
Pending PR
The resolution for the issue is in PR
enhancement
New feature or request
feature_request
labels
Jul 4, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider two examples
They key difference between these two calls is having one logger defined with
lazy=True
and the other without it. Loggers that are lazy will in fact try to call a function supplied as arg or kwarg but will succeed only if function has no arguments whatsoever. In the same time loggers that are not lazy will simple print out i.e.str(a_foo)
of a function.That said:
loguru-mypy
should flagloguru-mypy
should flagThe text was updated successfully, but these errors were encountered: