E0106
Message
Return with argument inside generator
Description
Used when a return statement with an argument is found in a generator function or method (e.g. with some yield statements).
This message belongs to the basic checker.
Explanation
Functions and methods that return values using yield (that is, generators) cannot in addition return values using return.
Python 2.6(?) and above raises a SyntaxError for this situation when importing the module. PyLint reports this error using this message, without depending on the import actually happening.