Jacob Walls
Jacob Walls
This is a good question -- it's either a bug or feature. I think it makes sense to keep the behavior as is, but I'm eager to hear other views,...
What do you think of the point about overriding and mock.patch'ing?
cc/ @adamtuft, could you lend us your view of this bug report? Thanks!
I think the current message makes sense. Happy to add a test case. Or look at a docs suggestion if you think understanding the message can be made simpler?
> Suggestion description: Used when an assignment is done on a function call but the inferred function doesn't return anything either implicitly or explicitly. I'm okay with some kind of...
Do you think we should use inference? Emit a message for `x is True` just if we infer x only takes boolean values? The "controversy" you point out makes me...
Superseded by #20075
@JaeHyuckSa do you have time to continue with this PR? I think Simon's suggestion for an `emit_warnings` helper is even easier now that main is Python 3.12+.
The assignment-from-none check needs to consider all possible inferred functions, not merely the first, so it should use `infer_all()`, not `safe_infer()`.
Thanks for the analysis. > at least the non-deterministic behavior seems to stem from https://github.com/pylint-dev/pylint/blob/main/pylint/lint/pylinter.py#L667 where the code is trying to convert a set of paths to a list. We...