bg0 dZddlmZddlmZddlmZddlmZm Z erddl m Z ddd d d Z e d ZGd deZddZdS)zjChecks for yoda comparisons (variable before constant) See https://en.wikipedia.org/wiki/Yoda_conditions. ) annotations) TYPE_CHECKING)nodes) BaseCheckerutils)PyLinter>>=<<=)r r r r )z==z!=r r r r cleZdZdZdZddddddgifiZd ZddZej dddZ dS)"MisplacedComparisonConstantCheckerz1Checks the placement of constants in comparisons.zcomparison-placementC2201zComparison should be %smisplaced-comparison-constantzUsed when the constant is placed on the left side of a comparison. It is usually clearer in intent to place it in the right hand side of the comparison. old_names)C0122z!old-misplaced-comparison-constantnode nodes.Compareleft nodes.NodeNGrightoperatorstrreturnNonect|tjrdSt||}|d|d|j}|d||fdS)N r)rargs) isinstancerConstREVERSED_COMPSget as_stringvalue add_message)selfrrrr suggestions w/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pylint/extensions/comparison_placement.py_check_misplaced_constantzvFFGGGGGr+N)r:rrr)r5 __future__rtypingrastroidrpylint.checkersrr pylint.lintrr" frozensetr0rr=rr+r)rDs #""""" ........%$$$$$$$S== y!CDD)H)H)H)H)H)H)H)HXHHHHHHr+