bgzdZddlmZddlmZddlmZddlmZddl m Z erddl m Z Gdd eZ ddZdS)z!Ellipsis checker for Python code.) annotations) TYPE_CHECKING)nodes) BaseChecker)only_required_for_messages)PyLintercDeZdZdZddiZedd d Zd S) EllipsisCheckerunnecessary_ellipsisW2301)zUnnecessary ellipsis constantunnecessary-ellipsiszUsed 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.r node nodes.ConstreturnNonect|dkrt|jtjr~t|jjtjtjfr|jjjs"t|jjj dkr| d|dSdSdSdS)a_Check if the ellipsis constant is used unnecessarily. Emits a warning when: - A line consisting of an ellipsis is preceded by a docstring. - A statement exists in the same scope as the ellipsis. For example: A function consisting of an ellipsis followed by a return statement on the next line. zbuiltins.Ellipsisr )rN) pytype isinstanceparentrExprClassDef FunctionDefdoc_nodelenbody add_message)selfrs q/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/checkers/ellipsis_checker.py visit_constzEllipsisChecker.visit_const!s KKMM0 0 04; 33 1t{1ENEDU3VWW 1  *3 1t{).//!33   3$  ? ? ? ? ? 1 0 0 043N)rrrr)__name__ __module__ __qualname__namemsgsrr r!rr r s[ !D  D  677@@@87@@@r!r linterrrrcJ|t|dS)N)register_checkerr )r(s rregisterr+9s$ OF3344444r!N)r(rrr)__doc__ __future__rtypingrastroidrpylint.checkersrpylint.checkers.utilsr pylint.lintrr r+r'r!rr3s ('"""""" ''''''<<<<<<%$$$$$$"@"@"@"@"@k"@"@"@J555555r!