Ask Your Question
0

What does Mypy mean when it complains about the violation of the [no-any-return] rule for a straightforward boolean expression?

asked 2022-09-07 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-05-20 05:00:00 +0000

huitzilopochtli gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-07 11:00:00 +0000

Seen: 9 times

Last updated: May 20 '22