code (playground):
def is_some(n):
n is not None
here, the user is trying to do an implicit return, but python does not have implicit returns. the hint given is this:
B015: Pointless comparison. Did you mean to assign a value? Otherwise, prepend `assert` or remove it.
the chance of someone meaning to write = and instead writing is not is approximately zero. if a pointless comparison appears at the end of a function, it should suggest returning it instead of suggesting assert, and the assignment suggestion should only appear if the operator contains =.
code (playground):
here, the user is trying to do an implicit return, but python does not have implicit returns. the hint given is this:
the chance of someone meaning to write
=and instead writingis notis approximately zero. if a pointless comparison appears at the end of a function, it should suggest returning it instead of suggestingassert, and the assignment suggestion should only appear if the operator contains=.