Ask Your Question

Revision history [back]

When Mypy complains about a violation of the [no-any-return] rule for a straightforward boolean expression, it means that the function is returning a value of type "Any" which indicates that the function can return any type of value. It is generally recommended to avoid using "Any" type since it can be the source of errors and can make the code harder to understand and maintain. Mypy suggests using more specific return type annotations to avoid this issue.