PY3.W2301

Unnecessary Ellipsis

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.

Noncompliant Code:

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

Compliant Code:

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

The content on this page is adapted from the Pylint User Guide, Copyright ©2003-2022, Logilab, PyCQA and contributors. All rights reserved. https://pylint.pycqa.org/en/latest/index.html#, and is used under the Python Software Foundation License Version 2. Examples, recipes, and other code in the Pylint documentation are additionally licensed under the Zero Clause BSD License.