mlog: make mlog helper take once keyword argument#8003
Merged
jpakkane merged 1 commit intomesonbuild:masterfrom Dec 16, 2020
Merged
mlog: make mlog helper take once keyword argument#8003jpakkane merged 1 commit intomesonbuild:masterfrom
jpakkane merged 1 commit intomesonbuild:masterfrom
Conversation
3 tasks
|
This pull request introduces 1 alert when merging f5c6d4d into 9133748 - view on LGTM.com new alerts:
|
We really want to have this in the log method as well. Fixes: mesonbuild#8002
f5c6d4d to
5095efd
Compare
|
This pull request introduces 1 alert when merging 5095efd into cef406b - view on LGTM.com new alerts:
|
Member
Author
|
the LGTM warning is stupid. It's complaining that I'm returning a function that returns None. but it looks like this: def _fun1() -> None: ...
def _fun2() -> None: ...
def fun(thing: bool = true) -> None:
if thing:
return _fun1()
return _fun2()Not returning here is odd. |
Contributor
|
Why not use |
Member
Author
|
it's generally considered a code smell in python to use an else when you return from a single if, both because it creates unnecessary indentation, and also because there is a small cost to the else block. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We really want to have this in the log method as well.
Fixes: #8002