You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when using this syntax, PyLint 2.4.3 will report More than one statement on a single line (multiple-statements).
While it is technically correct that the ellipsis is a statement, it is used to indicate the absence of meaningful statements. So in my opinion it would be better to have a special case for not reporting the situation in which there are two statements, the first of which is def and the second of which is Ellipsis.
The text was updated successfully, but these errors were encountered:
On my PC, the fix works for Protocols, but for some reason not for functions/methods. [...]
Never mind; it wasn't working for Protocols either, I messed up my local testing. Also I didn't realize that the fix for this was committed on master and not on the 2.4 branch and therefore wouldn't be in the 2.4.4 release anyway.
Code using type annotations often has no need for a function body and puts ellipsis (
...
) there to indicate that.For example when using
@overload
:(this was taken straight from PEP 484)
Or when defining a protocol:
(when using a Python version before 3.8, you'll have to install
typing_extensions
and importProtocol
from there)However, when using this syntax, PyLint 2.4.3 will report
More than one statement on a single line (multiple-statements)
.While it is technically correct that the ellipsis is a statement, it is used to indicate the absence of meaningful statements. So in my opinion it would be better to have a special case for not reporting the situation in which there are two statements, the first of which is
def
and the second of which isEllipsis
.The text was updated successfully, but these errors were encountered: