unnecessary-ellipsis / W2301ΒΆ

Message emitted:

Unnecessary ellipsis constant

Description:

Used when the ellipsis constant is encountered and can be avoided. A line of code consisting of an ellipsis is unnecessary if there is a docstring on the preceding line or if there is a statement in the same scope.

Problematic code:

def my_function():
    """My docstring"""
    ...  # [unnecessary-ellipsis]

Correct code:

def my_function():
    """My docstring"""

Created by the unnecessary_ellipsis checker.